Edit Images (OpenAI Native Format)
Edit a source image (with an optional mask) according to a prompt. See also Generate images; as well as the Gemini native format and Qwen native format.
Endpoint
POST /v1/images/editsUpload via multipart/form-data:
bash
curl https://ai.youqi.tech/v1/images/edits \
-H "Authorization: Bearer sk-YOUR_API_KEY" \
-F model="dall-e-2" \
-F image="@origin.png" \
-F mask="@mask.png" \
-F prompt="Replace the background with a seaside sunset"Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Image model, e.g. dall-e-2 |
image | file | Yes | Source image file |
mask | file | No | Mask file; transparent areas mark the region to edit |
prompt | string | Yes | Edit instruction |
n | integer | No | Number to generate, default 1 |
size | string | No | Size |
TIP
Supported edit / mask capabilities vary by model.