Skip to main content
POST
/
gpt-image-2
/
async
curl --request POST \
  --url https://api.modellix.ai/api/v1/openai/gpt-image-2/async \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "prompt": "A children's book drawing of a veterinarian using a stethoscope to listen to the heartbeat of a baby otter"
}
EOF
{
  "code": 0,
  "message": "success",
  "data": {
    "status": "pending",
    "task_id": "task-openai-abc123",
    "model_id": "gpt-image-2",
    "get_result": {
      "method": "GET",
      "url": "https://api.modellix.ai/api/v1/tasks/task-openai-abc123"
    }
  }
}

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

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json

Request payload for GPT Image 2 generation model.

Request payload for GPT Image 2 generation model.

prompt
string
required

Image description text, supports up to 32,000 characters

Required string length: 1 - 32000
Example:

"A children's book drawing of a veterinarian using a stethoscope to listen to the heartbeat of a baby otter"

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

Image 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.