Create task
Last updated November 23, 2026
Submit asynchronous high-fidelity image generation (including SVG/GIF) and editing (including markup) tasks for openai/gpt-image-2.6-sunburst.
Submit openai/gpt-image-2.6-sunburst tasks to /v1/tasks: the request returns a task id immediately while generation executes in the background.
Unified endpoint for generation and editing: omit image for text-to-image generation (supporting svg, gif, frame_count, and frame_duration_ms), or include image for reference-based editing (supporting mask or markup, mutually exclusive). Requests without reference images may also send the same fields as application/json.
https://gateway.amux.ai/v1/tasksAuthorization
headerAuthorizationstringRequiredBearer <your Amux AI key> Amux AI API key (Bearer token).
Request
multipart/form-datamodelstringRequiredModel identifier (optionally suffixed with :amux-special or :adobe).
promptstringRequiredText prompt for generation or editing (up to 32,000 characters).
imagearray<string>Optional reference image files (up to 16 files, maximum 25 MB each). Omit for text-to-image generation; include for image editing.
Both image and image[] field names are accepted.
maskstringOptional inpainting mask file whose transparent pixels (alpha = 0) mark the region to edit. Mutually exclusive with markup; effective only alongside reference images.
Provider support: Unsupported on adobe (pinning :adobe returns 400); supported on amux-special.
markupstringNew in GPT-Image 2.6: visual annotation/sketch overlay guiding edits. Mutually exclusive with mask; effective only alongside reference images.
Provider support: Unsupported on adobe (pinning :adobe returns 400); supported on amux-special.
nintegerDefault 1Number of images to generate (1–10, default 1); must be 1 when output_format is svg.
sizestringDefault "1024x1024"Output image pixel dimensions (defaults to 1024x1024). adobe renders native 4K and strictly enforces ≥ 655,360 total pixels; amux-special scales non-4K sizes to ~1.57 MP and uses super-resolution for 4K.
aspect_ratiostringAspect ratio (1:1, 4:3, 3:4, 3:2, 2:3, 16:9, or 9:16) as an alternative to size. Prefer size; if both are supplied, size takes precedence.
image_sizestringResolution tier (1K, 2K, or 4K), used in combination with aspect_ratio under the same conversion rules.
quality"low" | "medium" | "high" | "xhigh" | "max" | "auto"Default "auto"Render quality tier (low, medium, high, xhigh, max, or auto).
complexity"low" | "medium" | "high"Default "high"New in GPT-Image 2.6: visual and compositional complexity (low, medium, or high, default high). Supported on both amux-special and adobe.
background"transparent" | "opaque" | "auto"Default "auto"Background mode (transparent, opaque, or auto). Transparency requires png, webp, or gif.
output_format"png" | "jpeg" | "webp" | "svg" | "gif"Default "png"Output image format (png, jpeg, webp, svg, or gif, default png). svg and gif are generation-only (cannot be combined with image), and svg requires n=1.
Provider support: Unsupported on adobe for svg and gif (pinning :adobe returns 400); supported on amux-special.
output_compressionstringCompression level (0–100, default 100); applies only to jpeg and webp.
frame_countintegerDefault 9Animated GIF frame count (2–16, default 9). Effective only on generation tasks with output_format: "gif".
Provider support: Unsupported on adobe; supported on amux-special.
frame_duration_msintegerDefault 200Duration per GIF frame in milliseconds (≥ 20 and a multiple of 10, default 200). Effective only on generation tasks with output_format: "gif".
Provider support: Unsupported on adobe; supported on amux-special.
userstringUnique end-user identifier for abuse detection and monitoring.
webhook_urlstringPublic HTTPS URL to receive a POST callback once the task reaches a terminal state.
moderation"auto" | "low"Content moderation strictness. Effective only for pure generation tasks without reference images; ignored and recorded in notes when reference images are provided.
Response
200responseTask already reached a terminal state within a Prefer: wait window, or matched an existing task via idempotency key replay.
202responseTask accepted and estimated funds reserved. Poll or await webhook delivery using the returned id.
400responseInvalid request parameters (including stream: true, partial_images > 0, combining mask and markup, requesting svg/gif on an edit task, or pinning a provider that does not support a requested feature).
402responseInsufficient available workspace balance to cover the upper-bound reservation.
503responseConcurrent task limit reached; retry after the interval indicated in Retry-After.
Providers & availability
| Provider | Status | Billing | Capabilities & notes | Unsupported parameters |
|---|---|---|---|---|
amux-special | Live | Value per-image billing | Supports svg, gif (frame count & duration), multi-image edits, mask, and markup; 4K uses super-resolution | stream (not applicable on /v1/tasks) |
adobe | Live | Value per-image billing (slightly above amux-special) | True native 4K and exact custom pixels (≥ 655,360 total pixels) | output_format: svg / gif, frame_count, frame_duration_ms, mask, markup |
openai | Coming soon | Official token-based billing | Full official spec | — (activates upon launch) |
azure | Coming soon | Official Azure token-based billing | Full official spec | — (activates upon launch) |
Retrieving results
| Mode | Usage | Recommended scenario |
|---|---|---|
| Polling | GET /v1/tasks/{id} | Simple integration; poll every 2–5 seconds |
| Webhook | Pass webhook_url on submission | Event-driven backends without open connections |
| Bounded wait | Send header Prefer: wait=60 | Return the completed task inline if finished in time |
Task lifecycle states, webhook signature verification, and idempotency keys apply uniformly across all models; see Create task.
When to use
Sunburst renders at native 4K or animated gif can take over a minute. On a synchronous connection, a timeout in any reverse proxy, gateway, or HTTP client drops the response after compute charges have been incurred; strongly prefer /v1/tasks for 4K and GIF workloads.
Errors
Error responses follow OpenAI's standard schema. See Errors and retries for type codes and retry guidance.
curl https://gateway.amux.ai/v1/tasks \
-H "Authorization: Bearer $AMUX_API_KEY" \
-F "model=openai/gpt-image-2.6-sunburst" \
-F "prompt=Make the fox wear a red scarf" \
-F "image=@/path/to/image.png" \
-F "size=1024x1024" \
-F "webhook_url=https://hooks.example.com/amux"{
"id": "task_01M1CG35C16CJ790D00BV1RBVM",
"status": "queued",
"model": "openai/gpt-image-2.6-sunburst",
"created_at": "<string>",
"output": {
"images": [
{
"index": 0,
"url": "<string>"
}
]
},
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0
},
"cost": "0.0100",
"error": {
"message": "<string>",
"code": "<string>"
}
}