Amux AI

Create task

Last updated November 25, 2026

Submit an asynchronous bytedance/seedream-5.5 image task via /v1/tasks, supporting text-to-image, multi-image editing, native RGBA transparency, 99-layer decomposition, and rich-text OCR.

Submit an asynchronous bytedance/seedream-5.5 task via the unified /v1/tasks endpoint. Returns a task id immediately; fetch the completed output using Retrieve task. This asynchronous endpoint is recommended for multi-layer decomposition and rich-text OCR workloads.

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

Authorization

header
AuthorizationstringRequired

Bearer <your Amux AI key> Amux AI API key.

Request

application/json
modelstringRequired

Platform model ID. Append :provider to pin a specific provider.

promptstring

Text prompt. Optional for layer decomposition; required otherwise.

imagestring | array<string>

Reference images (single string or array of up to 10 strings). Layer decomposition requires exactly 1 image.

sizestring

Output size: 1K, 1.5K, 2K, or WxH for generation; 1K, 1.5K, 2K, or auto (no pixel strings) for layer decomposition.

output_format"png" | "jpeg"Default "png"

Output encoding format, defaulting to png. Extracted layers are always png.

background"auto" | "transparent" | "opaque"Default "auto"

Background transparency mode (auto / transparent / opaque). transparent works natively for text-to-image and image-to-image and cannot be combined with jpeg or layer_decomposition: true.

watermarkbooleanDefault false

Bottom-right "AI generated" watermark. Disabled (false) by default; pass true to enable.

layer_decompositionbooleanDefault false

Enable layer decomposition (up to 1 base image + 99 layers). Requires exactly 1 reference image; prompt is optional.

layer_decomposition_optionsobject

Layer decomposition options (effective only when layer_decomposition: true). With multipart/form-data, flat fields layer_max_images and layer_text_recognition are also accepted.

›layer_decomposition_optionsobject
max_imagesintegerDefault 30

Maximum total output images (including base image), from 2 to 100 (default 30).

text_recognitionbooleanDefault false

Whether to enable rich-text OCR on regular text layers (default false).

optimize_prompt_optionsobject

Prompt optimization settings (defaults to standard). With multipart/form-data, pass the flat text field optimize_prompt_mode instead.

›optimize_prompt_optionsobject
mode"standard" | "fast"Default "standard"

standard delivers higher quality with slightly higher latency; fast reduces latency with lighter optimization. Both modes share the same unit price.

webhook_urlstring

Webhook callback URL invoked when the task reaches a terminal state, delivering the {event, sent_at, task} envelope signed with Amux-Signature and retried with exponential backoff. Must be a public HTTPS URL; validated at submission.

Response

202response

Task created. Poll with id or wait for the webhook callback. Returns 200 if Prefer: wait reaches a terminal state within the wait window or on an idempotent replay.

400response

Invalid request parameters. Out-of-range values return an error listing valid options.

402response

Insufficient workspace balance to cover the pre-authorization hold.

Parameters

All generation parameters match the synchronous Volcengine Ark endpoint: size, image, background, output_format (default png), watermark (disabled by default), layer_decomposition, layer_decomposition_options, and optimize_prompt_options behave identically.

This endpoint unifies image generation and image editing: omit image for text-to-image, pass 1–10 items in image for image-to-image or multi-image editing (both supporting native RGBA transparency via background: "transparent"), or pass exactly 1 image with layer_decomposition: true for layer decomposition (prompt is optional in decomposition mode; background cannot be combined).

When uploading local files via multipart/form-data, send reference files in image, encode booleans as "true", pass layer decomposition sub-options either as a JSON string in layer_decomposition_options or via flat fields layer_max_images / layer_text_recognition, and pass the prompt optimization mode via optimize_prompt_mode.

Obtaining task results

Delivery modeUsage
PollingGET /v1/tasks/{id} every 5–10 seconds
WebhookPass webhook_url at submission
Synchronous waitInclude request header Prefer: wait=60

For task lifecycle states, webhook signature verification, and idempotency keys, see Create task.

Billing

Matches the synchronous endpoint: billed per input reference image and per output image tiered by actual pixel count; in layer decomposition mode, the base image and each extracted layer are billed separately. Check cost upon retrieval for the settled USD charge.

An upper-bound hold is reserved upon acceptance (layer_decomposition_options.max_images or 30 images by default for layer decomposition; 402 if balance is insufficient) and settled against actual usage upon completion, releasing any unused difference. Failed and expired tasks are not charged.

cURL
curl https://gateway.amux.ai/v1/tasks \
  -H "Authorization: Bearer $AMUX_API_KEY" \
  -d '{
    "model": "bytedance/seedream-5.5",
    "image": "https://example.com/poster.png",
    "layer_decomposition": true,
    "layer_decomposition_options": {
      "max_images": 30,
      "text_recognition": true
    },
    "webhook_url": "https://hooks.example.com/amux"
  }'
{
  "id": "task_01M5CWPZEAJ6FRGPDM1G7G1V29",
  "status": "queued",
  "model": "bytedance/seedream-5.5",
  "created_at": "2026-11-25T09:00:00Z",
  "output": {
    "images": [
      {
        "index": 0,
        "url": "https://cdn.amux.ai/gen/20261125/task_01M5CWPZEAJ6FRGPDM1G7G1V29-0.png",
        "layer": {
          "zIndex": 0,
          "role": "background",
          "bboxAbsolute": [
            0
          ],
          "bboxNormalized": [
            0
          ],
          "name": "<string>",
          "description": "<string>",
          "textRecognition": {
            "text": "<string>",
            "lines": [
              {
                "bboxAbsolute": [
                  0
                ],
                "bboxNormalized": [
                  0
                ],
                "runs": [
                  {
                    "text": "<string>",
                    "style": {
                      "similarFontFamily": "<string>",
                      "foregroundColor": "<string>",
                      "bold": false,
                      "italic": false,
                      "underline": false,
                      "strikethrough": false,
                      "shadow": false,
                      "translucent": false
                    }
                  }
                ]
              }
            ]
          }
        }
      }
    ],
    "videos": [
      {}
    ]
  },
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0
  },
  "cost": "0.035",
  "notes": [
    "dropped seed: this model has no seed parameter"
  ],
  "error": {
    "message": "<string>",
    "code": "<string>"
  }
}