curl --request POST \
--url https://api.modellix.ai/api/v1/openai/gpt-image-2 \
--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"
}
}
}GPT Image 2
OpenAI’s text-to-image model for detailed portraits, product shots, and cinematic frames at high resolution. It renders preset sizes up to 4K, including 3840x2160 and vertical 2160x3840, at low, medium, or high quality.
POST
/
openai
/
gpt-image-2
curl --request POST \
--url https://api.modellix.ai/api/v1/openai/gpt-image-2 \
--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"
}
}
}Body
application/json
Request payload for GPT Image 2 generation model.
Request payload for GPT Image 2 generation model.
Output size as width x height, or 'auto' for model-selected size. Presets are valid under OpenAI constraints (total pixels 655360-8294400, edges multiples of 16). Mapping: 1:1 1K/2K; 3:2 1K/2K; 2:3 1K/2K; 4:3 1K/2K; 3:4 1K/2K; 16:9 2K/4K; 9:16 2K/4K. No 1K for 16:9/9:16; no 4K for non-widescreen ratios.
Available options:
auto, 1024x1024, 2048x2048, 1536x1024, 3072x2048, 1024x1536, 2048x3072, 1024x768, 2048x1536, 768x1024, 1536x2048, 2048x1152, 3840x2160, 1152x2048, 2160x3840 Example:
"1024x1024"