Amux AI

Create task

Last updated November 23, 2026

Submit asynchronous image generation (including SVG/GIF) and editing (including markup) tasks for openai/gpt-image-2.6-flare.

Submit openai/gpt-image-2.6-flare 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.

POSThttps://gateway.amux.ai/v1/tasks

Authorization

header
AuthorizationstringRequired

Bearer <your Amux AI key> Amux AI API key (Bearer token).

Request

multipart/form-data
modelstringRequired

Model identifier (optionally suffixed with :amux-special or :adobe).

promptstringRequired

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

maskstring

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

markupstring

New 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 1

Number 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_ratiostring

Aspect 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_sizestring

Resolution 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_compressionstring

Compression level (0–100, default 100); applies only to jpeg and webp.

frame_countintegerDefault 9

Animated 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 200

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

userstring

Unique end-user identifier for abuse detection and monitoring.

webhook_urlstring

Public 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

200response

Task already reached a terminal state within a Prefer: wait window, or matched an existing task via idempotency key replay.

202response

Task accepted and estimated funds reserved. Poll or await webhook delivery using the returned id.

400response

Invalid 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).

402response

Insufficient available workspace balance to cover the upper-bound reservation.

503response

Concurrent task limit reached; retry after the interval indicated in Retry-After.

Providers & availability

ProviderStatusBillingCapabilities & notesUnsupported parameters
amux-specialLiveValue per-image billingSupports svg, gif (frame count & duration), multi-image edits, mask, and markup; 4K uses super-resolutionstream (not applicable on /v1/tasks)
adobeLiveValue 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
openaiComing soonOfficial token-based billingFull official spec— (activates upon launch)
azureComing soonOfficial Azure token-based billingFull official spec— (activates upon launch)

Retrieving results

ModeUsageRecommended scenario
PollingGET /v1/tasks/{id}Simple integration; poll every 2–5 seconds
WebhookPass webhook_url on submissionEvent-driven backends without open connections
Bounded waitSend header Prefer: wait=60Return 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

High-resolution 4K renders and animated gif outputs can take significantly longer than standard 1K renders. On a synchronous connection, a timeout in any reverse proxy, gateway, or HTTP client drops the response after compute charges have been incurred; 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
curl https://gateway.amux.ai/v1/tasks \
  -H "Authorization: Bearer $AMUX_API_KEY" \
  -F "model=openai/gpt-image-2.6-flare" \
  -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-flare",
  "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>"
  }
}