gpt-image-2-all chat endpoint — best prompt adherence. Same endpoint supports both text-to-image and reference-image editing with native multi-turn iteration.
/v1/images/generations and /v1/images/edits, the chat endpoint offers better prompt adherence and supports both text-to-image and image editing from the same endpoint, with native multi-turn iteration. Enter your API Key in the right-side Playground and pick an example from the dropdown (text-to-image / edit-with-reference / multi-turn).| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Fixed: gpt-image-2-all |
messages | array | Yes | Conversation messages; supports system / user / assistant roles |
messages[].content | string | array | Yes | Plain text (text-to-image) or multimodal array (edit with reference) |
stream | boolean | No | Streaming. This model returns one-shot — keep false |
content is an array):
| Field | Type | Required | Description |
|---|---|---|---|
type | enum | Yes | text or image_url |
text | string | Conditional | Required when type=text |
image_url.url | string | Conditional | Required when type=image_url. Accepts https://... or data:image/png;base64,... |
chat.completion response. The generated image appears as a URL or data URL embedded in choices[0].message.content:
content with a regex like https?://[^\s)]+\.(png|jpg|jpeg|webp) or data:image/[^\s)]+.assistant history and continue refining — same mental model as ChatGPTAPI Key from the API易 Console
Model name, fixed to gpt-image-2-all
gpt-image-2-all Conversation messages. Supports multi-turn and multimodal content.
Whether to stream the response. This model returns one-shot — keep false. Playground does not support streaming preview.
Sampling temperature (minor effect on image generation — default is fine)
0 <= x <= 2