Image playground

Generate or edit an image

POST
/edit-chat

One-shot, programmatic generation. A text-to-image call is just {prompt}; add image_ids to edit / compose from existing images. Always generates (no clarifying step). Returns a job_id — poll /jobs/<id>/status and fetch /jobs/<id>/results. Pass conversation_id to continue a prior conversation.

Authorization

token_auth
headerAuthorizationBearer <token>

Token-based authentication using access tokens.

Request Body

application/json
  1. body
prompt*Prompt

The image generation / edit instruction (or a from-scratch text-to-image prompt).

image_ids?array<string>|

Optional UUIDs of input images to edit / compose / use as references.

Defaultnull
identity_codes?array<string>|

Optional codes of saved On-Model identities to use as MODEL REFERENCE (+ POV grid).

Defaultnull
model?Model

Generation engine (auto | nano_banana_pro | gpt_image | seedream).

Default"auto"
size?Size

Quality / processing size (1K | 2K | 4K). Drives the generation resolution and the per-output price; independent of the delivered output_mode.

Default"2K"
output_mode?Output Mode

Delivered-output contract: auto (default; on this programmatic endpoint there is no planner, so auto behaves as match) | match (keep the input's dimensions) | ratio (a chosen aspect ratio) | custom (exact width×height; needs the custom-dimensions entitlement).

Default"auto"
aspect_ratio?|

Aspect ratio for output_mode="ratio" / from-scratch "match" (1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9).

Defaultnull
width?|

Exact output width for output_mode="custom" (256-7000).

Defaultnull
height?|

Exact output height for output_mode="custom" (256-7000).

Defaultnull
num_variations?Num Variations

How many images to generate (1-4).

Default1
conversation_id?|

Continue an existing conversation; omit to start a new one.

Defaultnull

Response Body

Successful Response

application/json
  1. response
job_id*Job Id
conversation_id*Conversation Id
status*Status
curl -X POST "https://example.com/edit-chat" \  -H "Content-Type: application/json" \  -d '{    "prompt": "string"  }'
{  "job_id": "string",  "conversation_id": "string",  "status": "string"}