Image APIs Overview
LLMAPI provides synchronous image endpoints for short requests and Task API for long-running production jobs.
| Use case | Documentation | Endpoint |
|---|---|---|
| OpenAI synchronous image generation | OpenAI Generations | POST /v1/images/generations |
| OpenAI synchronous image editing | OpenAI Edits | POST /v1/images/edits |
| Gemini native image and multimodal generation | Gemini Native | POST /v1beta/models/{model}:generateContent |
| Long-running production image jobs | Task API | POST /v1/tasks |
Key and Platform Selection
| Key type | Available image APIs | Notes |
|---|---|---|
| General API key / OpenAI group | /v1/images/generations, /v1/images/edits | Image generation permission must be enabled on the general group. |
| General API key / Gemini group | /v1beta/models/{model}:generateContent, /v1beta/models/{model}:streamGenerateContent | Use Gemini Native request bodies. |
| Task API key / per-model plans | /v1/tasks, /v1/tasks/events, /v1/images/generations, /v1/images/edits | OpenAI Images compatible synchronous endpoints wait for the result. Pricing and routing follow the effective plan for the requested model on that key. |
| Other general groups | Image APIs depend on the group platform | Use 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/modelswith that key to discover available models and prices. - If an existing OpenAI Images client can only call
/v1/images/generationsor/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 atask_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.