Skip to content

Image APIs Overview

LLMAPI currently provides three image calling patterns. Synchronous endpoints route by the general API key's platform group. Async image generation requires an image API key bound to an image batch group.

Use caseDocumentationEndpoint
OpenAI synchronous image generationOpenAI GenerationsPOST /v1/images/generations
OpenAI synchronous image editingOpenAI EditsPOST /v1/images/edits
Gemini native images or multimodal callsGemini Native Images/v1beta/models...
Long-running production image jobsAsync Image TasksPOST /v1/images/tasks
Async task push updatesTask EventsGET /v1/images/tasks/events

Key and Platform Selection

Key typeAvailable image APIsNotes
General API key / OpenAI group/v1/images/generations, /v1/images/editsImage generation permission must be enabled on the general group.
General API key / Gemini group/v1beta/models/{model}:generateContentSynchronous calls use Gemini native request bodies.
General API key / Antigravity group/antigravity/v1beta/models...Uses the dedicated Antigravity account pool.
Image API key / image batch group/v1/images/tasks, /v1/images/tasks/eventsFor long-running async image jobs; the model must exist in the image batch group.
Other general groupsOpenAI Images API is not availableDo not send non-OpenAI image models to /v1/images/generations.

Integration Guidance

  • Use synchronous OpenAI image endpoints for internal tests or short OpenAI image requests.
  • Use async image tasks with an image API key for customer-facing long-running jobs.
  • Use /v1beta/models... for short Gemini image or multimodal requests. For long-running production image jobs, use /v1/images/tasks with gemini-2.5-flash-image or gemini-3.1-flash-image.
  • If you see Images API is not supported for this platform, the current key group is not OpenAI and cannot call the OpenAI Images API.