Images
Create an image
Creates an image given a prompt using the OpenAI-compatible Images API. The request returns one or more generated images as URLs or base64-encoded JSON data.
Not every provider implements the Images API. Requests routed to a provider that does not support it return 400 Bad Request with an explanatory error message; use /chat/completions for those providers.
post/images/generations
Query parameters
provider'ollama' | 'ollama_cloud' | 'groq' | 'llamacpp' | 'openai' | 'cloudflare' | 'cohere' | 'anthropic' | 'deepseek' | 'google' | 'mistral' | 'minimax' | 'moonshot' | 'nvidia' | 'zai'
Specific provider to use (default determined by model)
Request body
Response
Successful response