Skip to content
中文

POST /v1/images/edits

Method: POSTEndpoint: /v1/images/edits

This section contains endpoint-specific behavior, parameters, or usage notes for this API. This section contains endpoint-specific behavior, parameters, or usage notes for this API. This section contains endpoint-specific behavior, parameters, or usage notes for this API.

This section contains endpoint-specific behavior, parameters, or usage notes for this API. This section contains endpoint-specific behavior, parameters, or usage notes for this API.

Request Parameters

Query Parameters

text
async
string
  // provider-specific example normalized for English documentation
Required
Example:
true
webhook
string
Optional
Example:
https://www.baidu.com/notify

Header Parameters

text
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}

Body Parameters multipart/form-data

text
image
file
Supports multiple images
Required
Example:
E:\\Desktop\\gpt\\icon_samll2.png
prompt
string
Required
Example:
Put on glasses
model
string
Required
Supports gpt-image-1, flux-kontext-pro, and flux-kontext-max
Example:
gpt-image-1

Example Request

Shell

bash
curl --location --request POST '/v1/images/edits?async=true&webhook=https://www.baidu.com/notify' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--form 'image=@"E:\\\\Desktop\\\\gpt\\\\icon_samll2.png"' \
--form 'prompt="Put on glasses"' \
--form 'model="gpt-image-1"'

Response

🟢 200 Success

Content Type: application/json

Response Schema

text
object

Example

json
{
    "task_id": "3dad96708a77485e97ac7ef652796d7b"
}