gpt-image-2-all text-to-image API reference and interactive playground — generate images from text prompts, $0.03/image
Bearer sk-xxx), type a prompt, and click send.| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Fixed value: gpt-image-2-all |
prompt | string | Yes | Prompt. Include size/ratio/style here |
response_format | string | No | url (default, R2 CDN link) or b64_json |
url mode (default, R2 CDN global acceleration):
b64_json mode (requires explicit "response_format": "b64_json"):
API Key from the API易 Console
Model name, fixed to gpt-image-2-all
gpt-image-2-all Prompt. Include size/ratio/style here, e.g., Landscape 16:9 cinematic, old lighthouse at sunset
"Landscape 16:9 cinematic, old lighthouse at sunset"
Response format. url returns an R2 CDN link (default); b64_json returns a base64 string already prefixed with a data URL header
url, b64_json Image successfully generated
Result array (this model returns 1 image per call)