Docs
Images API
A dedicated image path. When you do not need conversational context and only generate or edit, this is simpler.
Generation
POST /images/generations with prompt and size. Use n to set how many to produce.
| Endpoint | Field | Note |
|---|---|---|
| /images/generations | prompt | Required |
| /images/generations | size | Model dependent |
| /images/generations | n | 1–4 |
| /images/edits | image | Source file |
| /images/edits | mask | Transparent area is repainted |
Editing
POST /images/edits with the source and a mask. Only the transparent regions of the mask are repainted.
Reference images
Use reference_images to hold style or character consistency. Only supporting models become candidates.