Skip to main content
POST
/
gpt-image-2-edit
/
async
curl --request POST \
  --url https://api.modellix.ai/api/v1/openai/gpt-image-2-edit/async \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "images": [
    "https://example.com/input.png"
  ],
  "prompt": "Add a watercolor effect to this image"
}
'
{
  "code": 0,
  "message": "success",
  "data": {
    "status": "pending",
    "task_id": "task_abc123xyz",
    "model_id": "gpt-image-2-edit"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.modellix.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request payload for GPT Image 2 Edit model.

Request payload for GPT Image 2 Edit model.

images
string[]
required

Input image URL(s) to edit. Direct HTTPS URLs as string array. Supports up to 16 images for GPT Image models

Required array length: 1 - 16 elements

Direct image URL (https only)

Example:
["https://example.com/input.png"]
prompt
string
required

Description of the desired edits, supports up to 32,000 characters

Required string length: 1 - 32000
Example:

"Add a watercolor effect to this image"

size
enum<string>
default:1024x1024

Output image size in pixels (width x height). Includes standard and 2K/4K presets

Available options:
1024x1024,
1536x1024,
1024x1536,
2048x2048,
2048x1152,
3840x2160,
2160x3840
Example:

"1024x1024"

quality
enum<string>
default:low

Output quality level. 'low': fast draft (default), 'medium': balanced, 'high': best quality

Available options:
low,
medium,
high
Example:

"high"

Response

Task submitted successfully

Response object for asynchronous task submission.

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required

Detailed data about the submitted asynchronous task.