Amux AI

Create task

Last updated October 21, 2026

Submit an async bytedance/seedream-5.0-pro image task through the unified /v1/tasks entry, with image-to-image and layer decomposition.

Asynchronous image generation with bytedance/seedream-5.0-pro through the unified Amux Tasks entry. The request returns a task id immediately; use Retrieve task to get the result.

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

Authorization

header
AuthorizationstringRequired

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

Request

application/json
modelstringRequired

Model ID on Amux. Append :provider to pin a provider.

promptstring

The prompt. Optional for layer decomposition; required otherwise.

imagestring | array<string>

Reference images: a string or an array of strings, up to 10. Layer decomposition needs exactly one.

sizestring

Tiers 1K / 1.5K / 2K; generation also accepts WxH; decomposition also accepts auto but no pixel strings.

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

Output encoding. Layers are always png.

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

transparent needs exactly one input image with an alpha channel and cannot be combined with jpeg.

watermarkbooleanDefault false

The "AI generated" mark. Off by default here; pass true to add it.

layer_decompositionbooleanDefault false

Layer decomposition. Needs exactly one reference image; prompt may be omitted.

optimize_prompt_optionsobject

Prompt optimization settings. Omit it for the upstream default, standard. With multipart,

send it as the flat text field optimize_prompt_mode.

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

standard gives higher quality and takes longer; fast is quicker with slightly lower quality. Both are priced the same.

webhook_urlstring

When the task reaches a terminal state we POST the result here (a {event, sent_at, task}

envelope, an Amux-Signature signature, retries with backoff).

https only, and no private addresses (webhooks are sent from our servers). The URL is validated

at submission and rejected if invalid.

Response

202response

Task created. Poll with the id or wait for the webhook. With Prefer: wait and a terminal state

reached in time you get 200 and the same body as retrieval; an idempotent replay also returns 200.

400response

Invalid parameters. When a value is outside this model's range, the error lists the accepted values.

402response

Available balance does not cover the reservation.

Parameters

Identical to the synchronous endpoint: size, image, layer_decomposition, watermark (off by default here), output_format, background and optimize_prompt_options all take effect as-is.

This endpoint does not separate generation from editing: omit image for text-to-image, pass it for image-to-image, and pass exactly one image with layer_decomposition: true for layer decomposition, where prompt is optional.

With multipart/form-data, reference images go in the image file field, booleans are sent as the string "true", and the prompt optimization mode is sent as optimize_prompt_mode.

Getting the result

MethodUsage
PollingGET /v1/tasks/{id}, every 5–10 seconds
WebhookPass webhook_url at submission
Wait in placeRequest header Prefer: wait=60

Task lifecycle, webhook signing and idempotency keys are the same for every model; see Create task.

Billing

Same as the synchronous endpoint: per image, tiered by each output image's actual pixels; with layer decomposition the base image and each layer are billed separately, and reference images are billed per image. cost on retrieval is the actual charge.

The upper bound is reserved at submission and settled on actual usage, with the difference refunded; if the available balance cannot cover the reservation you get 402. 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.0-pro",
    "image": "https://example.com/poster.png",
    "layer_decomposition": true,
    "webhook_url": "https://hooks.example.com/amux"
  }'
{
  "id": "task_01M5CWPZEAJ6FRGPDM1G7G1V29",
  "status": "queued",
  "model": "bytedance/seedream-5.0-pro",
  "created_at": "2026-10-21T08:25:44Z",
  "output": {
    "images": [
      {
        "index": 0,
        "url": "https://cdn.amux.ai/gen/20261021/task_01M5CWPZEAJ6FRGPDM1G7G1V29-0.jpg",
        "layer": {
          "zIndex": 0,
          "role": "background",
          "bboxAbsolute": [
            0
          ],
          "bboxNormalized": [
            0
          ],
          "name": "<string>",
          "description": "<string>"
        }
      }
    ],
    "videos": [
      {}
    ]
  },
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0
  },
  "cost": "0.043",
  "notes": [
    "dropped seed: this model has no seed parameter"
  ],
  "error": {
    "message": "<string>",
    "code": "<string>"
  }
}