Skip to content

Image APIs Overview

LLMAPI provides synchronous image endpoints for short requests and Task API for long-running production jobs.

Use caseDocumentationEndpoint
OpenAI synchronous image generationOpenAI GenerationsPOST /v1/images/generations
OpenAI synchronous image editingOpenAI EditsPOST /v1/images/edits
Gemini native image and multimodal generationGemini NativePOST /v1beta/models/{model}:generateContent
Long-running production image jobsTask APIPOST /v1/tasks

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}:generateContent, /v1beta/models/{model}:streamGenerateContentUse Gemini Native request bodies.
Task API key / per-model plans/v1/tasks, /v1/tasks/events, /v1/images/generations, /v1/images/editsOpenAI Images compatible synchronous endpoints wait for the result. Pricing and routing follow the effective plan for the requested model on that key.
Other general groupsImage APIs depend on the group platformUse the endpoint that matches the selected platform.

Integration Guidance

  • Use synchronous OpenAI image endpoints for short OpenAI image requests.
  • Use Gemini Native endpoints for Gemini image and multimodal requests.
  • Use Task API for customer-facing long-running jobs.
  • The requested model's effective plan also applies when a Task API key calls the OpenAI Images compatible synchronous endpoints. Do not add a plan parameter or change the model name; use GET /v1/tasks/models with that key to discover available models and prices.
  • If an existing OpenAI Images client can only call /v1/images/generations or /v1/images/edits, you may use a Task API key with the same request shape. It waits synchronously for up to 120 seconds; if the request times out and returns a task_id, use the Task API to query the final status.
  • If you see Images API is not supported for this platform, the current key group cannot call the OpenAI Images API. For Gemini groups, use Gemini Native.