Generate or edit an image
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.
token_authAuthorizationBearer <token>Token-based authentication using access tokens.
application/json- body
prompt*PromptThe 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.
nullidentity_codes?array<string>|Optional codes of saved On-Model identities to use as MODEL REFERENCE (+ POV grid).
nullmodel?ModelGeneration engine (auto | nano_banana_pro | gpt_image | seedream).
"auto"size?SizeQuality / processing size (1K | 2K | 4K). Drives the generation resolution and the per-output price; independent of the delivered output_mode.
"2K"output_mode?Output ModeDelivered-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).
"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).
nullwidth?|Exact output width for output_mode="custom" (256-7000).
nullheight?|Exact output height for output_mode="custom" (256-7000).
nullnum_variations?Num VariationsHow many images to generate (1-4).
1conversation_id?|Continue an existing conversation; omit to start a new one.
nullSuccessful Response
application/json- response
job_id*Job Idconversation_id*Conversation Idstatus*Statuscurl -X POST "https://example.com/edit-chat" \ -H "Content-Type: application/json" \ -d '{ "prompt": "string" }'{ "job_id": "string", "conversation_id": "string", "status": "string"}