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 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 images or multimodal calls | Gemini Native Images | /v1beta/models... |
| Long-running production image jobs | Async Image Tasks | POST /v1/images/tasks |
| Async task push updates | Task Events | GET /v1/images/tasks/events |
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 | Synchronous 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/events | For long-running async image jobs; the model must exist in the image batch group. |
| Other general groups | OpenAI Images API is not available | Do 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/taskswithgemini-2.5-flash-imageorgemini-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.