Amux AI

Create image

Last updated October 21, 2026

Generate images synchronously with bytedance/seedream-5.0-pro on the Volcengine Ark native endpoint /api/v3/images/generations, with image-to-image and layer decomposition.

Synchronous image generation with bytedance/seedream-5.0-pro. Requests and responses use the native Volcengine Ark format, so the official SDK works once its base_url points here. Text-to-image, image-to-image and layer decomposition share this endpoint.

POSThttps://gateway.amux.ai/api/v3/images/generations

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; without it the model detects subjects, text and background on its own;

required otherwise.

imagestring | array<string>

Reference images, optional — leave it out for text-to-image, give it for image-to-image.

A string for one image, an array of strings for several, up to 10, each ≤ 30 MB.

Each item is an https URL or data:image/<format>;base64,…. URLs must be publicly

reachable; private addresses or plain http are rejected with 400.

sizestring

Output size. Generation accepts the tiers 1K / 1.5K / 2K (default 2K, no 4K)

or a WxH pixel string (roughly 0.92–4.62 MP total, forwarded as-is).

Layer decomposition accepts only 1K / 1.5K / 2K / auto (default auto) — no pixel strings.

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

Output encoding. With layer decomposition it applies to the base image only — layers are always png.

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

transparent produces a transparent png. Image-to-image only: it needs **exactly one input image

with an alpha channel** and cannot be combined with output_format: jpeg. Breaking either rule returns 400.

watermarkbooleanDefault false

The "AI generated" mark in the bottom-right corner. On by default upstream; off by default here — pass true to add it.

layer_decompositionbooleanDefault false

Layer decomposition: split one image into a base image plus layers. Requires exactly one

image (png / jpeg, ideally ≥ 512×512); prompt may be omitted.

optimize_prompt_optionsobject

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

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

response_format"url" | "b64_json"Default "url"

How images come back. With b64_json, each data[] item carries the base64 and no url, as upstream does;

outputs are stored either way and remain visible in logs and the Playground.

Response

200response

Images are ready.

400response

Invalid parameters: layer decomposition with zero or several images, a pixel size in decomposition

mode, more than 10 reference images, the transparent background rules not met, or an unusable image URL.

402response

Available balance does not cover the reservation.

502response

Upstream generation failed. Nothing is charged and the reservation is released.

Size

size accepts one of two forms:

  • Resolution tier: 1K, 1.5K or 2K; default 2K. 4K is not supported.
  • Pixels: WxH, with a total of 921,600 – 4,624,220 pixels and an aspect ratio between 1/16 and 16.

Layer decomposition accepts tiers and auto only (default auto), not pixel values.

Reference images

Pass them in image: a string for one, an array for several, up to 10 images of at most 30 MB each. Public HTTPS URLs and data:image/<format>;base64,… (lowercase format name) are accepted. Omit image for text-to-image.

Layer decomposition

layer_decomposition: true splits one image into a base image and up to 16 layers:

  • image must be exactly one png or jpeg of at least 512×512 pixels;
  • prompt is optional and selects which elements to extract; without it the model detects subjects, text and background on its own;
  • in the response data, the base image has z_index 0 and layers count up from 1, each with bounding_box, name and description;
  • layers are always png with an alpha channel; output_format applies to the base image only;
  • bounding_box.normalized holds integers from 0 to 1000; prefer absolute when placing layers on the base image.

Layer decomposition suits posters, illustrations and design files with distinct elements. Images that are too complex may be rejected by upstream with a 400; nothing is charged.

Other parameters

ParameterDescription
watermarkThe "AI generated" mark in the bottom-right corner. Off by default here; pass true to add it
output_formatjpeg (default) or png
backgroundtransparent returns a transparent png. Image-to-image only; requires exactly one input image with an alpha channel and cannot be combined with jpeg
optimize_prompt_options.modePrompt optimization: standard (default) or fast. fast is quicker with slightly lower quality; both are priced the same
response_formaturl (default) or b64_json. With b64_json only base64 is returned, without url

This model does not support n, seed or streaming; each request produces one image, except for layer decomposition.

Latency

The request returns once the images are ready. Measured times are about 15–60 seconds for text-to-image and image-to-image, and 60–90 seconds for layer decomposition. To avoid holding the connection, use Amux Tasks.

Billing

Billed per image, not per token. The tier is set by each output image's actual pixel count: up to 2.61 MP is the lower tier (1K, 1.5K), above that the higher tier (2K). With layer decomposition the base image and each layer are billed separately by their own pixel counts, at a lower unit price than single image generation. Reference images are billed per image.

The billed count is usage.generated_images in the response. output_tokens and total_tokens are upstream's area-based reference figures and are not billed.

See the model page for prices. The upper bound is reserved at submission (17 images for layer decomposition), then settled on actual usage with the difference refunded. Failed requests are not charged.

Ways to call

MethodEndpointNotes
Volcengine Ark native (this page)POST /api/v3/images/generationsSynchronous; Volcengine Ark response format
OpenAI-compatiblePOST /v1/images/generationsSynchronous; OpenAI response format with an amux block
Amux TasksPOST /v1/tasksAsynchronous; returns a task ID, supports webhooks

All three share the same routing, billing and task records, and the parameters above take effect on all of them.

Errors

The error body matches OpenAI's; see Errors and retries for type values and retry semantics.

cURL
curl https://gateway.amux.ai/api/v3/images/generations \
  -H "Authorization: Bearer $AMUX_API_KEY" \
  -d '{
    "model": "bytedance/seedream-5.0-pro",
    "prompt": "一只红色的纸船漂在雨后的街道上,电影感光影",
    "size": "2K",
    "watermark": false
  }'
{
  "model": "doubao-seedream-5-0-pro-260628",
  "created": 1792511123,
  "data": [
    {
      "size": "2048x2048",
      "url": "https://cdn.amux.ai/gen/20261021/task_01M5CWPZEAJ6FRGPDM1G7G1V29-0.jpg",
      "output_format": "jpeg"
    }
  ],
  "usage": {
    "generated_images": 1,
    "output_tokens": 16384,
    "total_tokens": 16384
  }
}