Ollama exposes an experimental OpenAI-compatibleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/phpaisdk/ollama/llms.txt
Use this file to discover all available pages before exploring further.
/images/generations endpoint. The aisdk/ollama provider supports this endpoint through the standard Generate::image() interface, allowing you to generate images with any image model installed on your Ollama server.
Basic image generation
Fields sent to Ollama
The adapter deliberately restricts the request body to only the fields Ollama’s experimental endpoint documents. Regardless of what you pass to the fluent builder, only these four fields are forwarded:| Field | Description |
|---|---|
model | The model ID passed to Ollama::model(). |
prompt | The text prompt passed to Generate::image(). |
size | The requested image dimensions (e.g. '1024x1024'). |
response_format | Always set to b64_json by the adapter. |
n (count), seed, quality, style, user, and any raw provider options — are silently dropped before the request is sent.
Provider options and raw overrides are not forwarded for image requests. Only the four documented fields above are included in the request body.
Default size
If you do not call->size(), the adapter defaults to '1024x1024'. Ollama requires a size field to be present, so the adapter always ensures it is set:
Speech generation
Ollama does not expose an OpenAI-compatible speech endpoint, so
Generate::speech() is intentionally not implemented in this provider. Attempting to use a speech model through the Ollama adapter is not supported.