Skip to main content
For new integrations, use Image Generation and the unified /ai/v1/images/generations protocol for generation, task queries, Webhooks, and errors. The OpenAI-compatible and vendor adapter interfaces on this page remain available. Before calling a model, query the Model Schema API, select the protocol by the returned path, and read that entry’s request.schema; do not rely on array order.

Current model inventory

This inventory shows models that are currently available. It does not mean that every model accepts the same fields. Select the endpoint by path in the model Schema response and read that entry’s request.schema.

API Interface

Request URL

<model_path> is <provider/model_id>, for example, <openai/gpt-image-1.5>, <qianfan/qwen-image>.

Request Headers

Request Parameters

General Parameters

OpenAI Model Parameters

Flux Model Parameters

Qwen Model Parameters

Doubao Model Parameters

The actual number of images that can be generated is influenced not only by max_images but also by the number of reference images provided. The number of input reference images + the final number of generated images ≤ 15.

Usage Examples

OpenAI

gpt-image-2

This is an OpenAI image editing model. Use the full model name gpt-image-2; image2 is not a valid model ID. When the endpoint returns b64_json, the examples below save it as edited.png.

Google Imagen

Qwen

Doubao

Flux

  • flux-2-flex and flux-2-pro are asynchronous endpoints, requiring a two-step request. This series is extremely fast, almost instantaneous.

FLUX One-Step Drawing

Ideogram V3

  1. Versions below V3 (V_2, V_1, etc.) are old interfaces and are not supported.
  2. The returned links require a proxy network to access.

Error Responses and Compatibility Error Codes

This section applies to the Legacy /v1/images/* endpoints on this page. The new /ai/v1/images/* endpoints use a separate image error contract. Handle the response structures and error codes of the two interfaces separately. A general error response from a Legacy image endpoint has the following structure. param is optional, and tid is usually appended to message instead of being returned as a separate field:

Submit HTTP 5xx error feedback

Only when a request returns HTTP 5xx, submit feedback and include the tid from message.
In addition to the stable compatibility error codes above, Legacy image endpoints may return other dynamic code values and sanitized message values from model providers and compatibility paths. These dynamic codes are an open set; clients must not treat codes outside the table as a stable enum. The tid in message is the request trace ID.
Last updated: 2026-09-01