Seedream 5.0 Pro API, Seedream 5.0 Flash API, Seedream 5.0 Lite API, Seedream 4.5 API, Seedream 4.0 API: Pricing, Documentation

by BytePlus

Seedream by ByteDance provides powerful AI image generation and editing capabilities with versions optimized for quality and versatility. Through Pixazo's API, developers can access text-to-image generation and advanced image editing features including multi-image editing. The API leverages ByteDance's extensive AI research to deliver high-quality visuals suitable for content creation and commercial applications.

Get API Key
Seedream 5 AI API
View in Playground

Models Version

WELCOME BONUS

Get $5 Free Credit on First Payment

No strings attached — add funds and get $5 bonus instantly

Claim Your $5 →

Seedream 5 Pro API Documentation

  • Premium retouching: background swaps, relighting and cleanup at the highest quality tier.
  • Photorealistic object insertion: composite products or elements seamlessly into scenes.
  • Multi-reference composition: combine up to 10 reference images (e.g. place a product into a new setting).
  • Brand-consistent variations: produce style-matched edits of hero imagery for campaigns.

Base URL

https://gateway.pixazo.ai/seedream-5-pro/v1/edit-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Seedream 5 Pro Edit generate request - Seedream 5 Pro Image Edit API

Request Code

POST https://gateway.pixazo.ai/seedream-5-pro/v1/edit-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "add sunglasses to the cat",
  "image": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"
  ],
  "size": "2K"
}
import requests

url = "https://gateway.pixazo.ai/seedream-5-pro/v1/edit-image"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "add sunglasses to the cat",
    "image": [
        "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"
    ],
    "size": "2K"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/seedream-5-pro/v1/edit-image';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  prompt: 'add sunglasses to the cat',
  image: [
    'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg'
  ],
  size: '2K'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/seedream-5-pro/v1/edit-image" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "add sunglasses to the cat",
    "image": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"],
    "size": "2K"
  }'

Output

{
  "request_id": "seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-pro",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-pro",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Seedream 5 Pro Edit generate request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—up to ~600 English words (recommended)Text instruction describing the edit to apply to the source image(s). The provider recommends keeping prompts under ~600 English words.
imageYesstring | array—URL or array of up to 10 URLsSource image(s) to edit — a single public image URL or an array of up to 10 reference-image URLs. Each image: JPEG, PNG, WEBP, BMP, TIFF, GIF or HEIC/HEIF; max 30 MB per file; width and height each > 14 px; total size up to 6000×6000 px; aspect ratio between 1:16 and 16:1.
sizeNostring2K1K, 2K; or WIDTHxHEIGHT in pixelsOutput resolution. Pass a tier (1K or 2K) and the model chooses the exact dimensions to fit your prompt, or pass explicit pixel dimensions such as 2048x1024. Explicit dimensions must have total pixels between 1280x720 (921,600) and 4,624,220 and an aspect ratio between 1:16 and 16:1.
watermarkNobooleanfalsetrue, falseSet to true to add a small AI-generated watermark to the output image. Off by default.
output_formatNostringjpegpng, jpegEncoding of the generated image. Note: the gateway-hosted result URL always ends in .jpg regardless of format; the encoded bytes match your output_format choice.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image—JPG, PNG, WEBPImage(s) to edit.

Example Request

{
  "prompt": "add sunglasses to the cat",
  "image": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"
  ],
  "size": "2K"
}

Response

{
  "request_id": "seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: $0.035"
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'seedream-5-pro' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-pro",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-pro",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-04-17T11:41:07.503Z",
  "updated_at": "2026-04-17T11:42:15.000Z",
  "completed_at": "2026-04-17T11:42:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/jpeg or image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Seedream 5 Pro API Pricing

ResolutionPrice (USD)
Up to 2.61 MP (1K, 1.5K or smaller pixel sizes)$0.045 per image
Above 2.61 MP (2K)$0.09 per image
Each reference image after the first$0.003 per input image
Text to Image

Seedream 5 Pro API Documentation

  • High-fidelity hero images: landing pages, campaigns and key art where detail matters most.
  • Photorealistic product renders: packaging mockups and premium product visuals.
  • Editorial illustration: magazine-quality art for articles and features.
  • Print-ready visuals: 2K output suitable for high-quality print and large display.

Base URL

https://gateway.pixazo.ai/seedream-5-pro/v1/text-to-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Seedream 5 Pro Text to Image generate request - Seedream 5 Pro Text to Image API

Request Code

POST https://gateway.pixazo.ai/seedream-5-pro/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
  "size": "2K"
}
import requests

url = "https://gateway.pixazo.ai/seedream-5-pro/v1/text-to-image"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
    "size": "2K"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/seedream-5-pro/v1/text-to-image';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  prompt: 'a majestic lion in a field of flowers, golden hour lighting, cinematic',
  size: '2K'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/seedream-5-pro/v1/text-to-image" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
    "size": "2K"
  }'

Output

{
  "request_id": "seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-pro",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-pro",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Seedream 5 Pro Text to Image generate request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—up to ~600 English words (recommended)Text prompt describing the image to generate. Be specific and descriptive for best results. The provider recommends keeping prompts under ~600 English words.
sizeNostring2K1K, 2K; or WIDTHxHEIGHT in pixelsOutput resolution. Pass a tier (1K or 2K) and the model chooses the exact dimensions to fit your prompt, or pass explicit pixel dimensions such as 2048x1024. Explicit dimensions must have total pixels between 1280x720 (921,600) and 4,624,220 and an aspect ratio between 1:16 and 16:1.
watermarkNobooleanfalsetrue, falseSet to true to add a small AI-generated watermark to the output image. Off by default.
output_formatNostringjpegpng, jpegEncoding of the generated image. Note: the gateway-hosted result URL always ends in .jpg regardless of format; the encoded bytes match your output_format choice.

Example Request

{
  "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
  "size": "2K"
}

Response

{
  "request_id": "seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: $0.035"
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'seedream-5-pro' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "seedream-5-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-pro",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/seedream-5-pro_019d9b3e-9e95-75e3-7533-a5f1149cd9f94"

Response (Completed)

{
  "request_id": "seedream-5-pro_019d9b3e-9e95-75e3-7533-a5f1149cd9f94",
  "status": "COMPLETED",
  "model_id": "seedream-5-pro",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-pro_019d9b3e-9e95-75e3-7533-a5f1149cd9f94/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-04-17T11:41:06.171Z",
  "updated_at": "2026-04-17T11:41:57.000Z",
  "completed_at": "2026-04-17T11:41:57.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/jpeg or image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Seedream 5 Pro API Pricing

ResolutionPrice (USD)
Up to 2.61 MP (1K, 1.5K or smaller pixel sizes)$0.045 per image
Above 2.61 MP (2K)$0.09 per image
Each reference image after the first$0.003 per input image
Layerize

Seedream 5 Pro API Documentation

https://gateway.pixazo.ai/seedream-5-0-pro/v1/layerize

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Seedream 5.0 Pro Layerize generate request - Seedream 5.0 Pro Layerize API

Request Code

POST https://gateway.pixazo.ai/seedream-5-0-pro/v1/layerize
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
  "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
  "image_size": "auto",
  "enable_safety_checker": true
}
import requests

url = "https://gateway.pixazo.ai/seedream-5-0-pro/v1/layerize"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
    "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
    "image_size": "auto",
    "enable_safety_checker": True
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/seedream-5-0-pro/v1/layerize';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  image_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png',
  prompt: 'a majestic lion in a field of flowers, golden hour lighting, cinematic',
  image_size: 'auto',
  enable_safety_checker: true
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/seedream-5-0-pro/v1/layerize" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
    "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
    "image_size": "auto",
    "enable_safety_checker": true
  }'

Output

{
  "request_id": "seedream-5-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "seedream-5-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-0-pro-layerize",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "seedream-5-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-0-pro-layerize",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Seedream 5.0 Pro Layerize generate request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
image_urlYesstring—HTTP(S) URL to an image; 512×512 – 6000×6000 px, aspect 1/16 – 16, ≤ 30 MBThe finished image to decompose. Must be publicly reachable.
promptNostring— (auto-detect elements)free text; may contain <bbox>left top right bottom</bbox> tagsWhich elements to separate. Leave empty and the model picks the major elements itself. Normalized <bbox> tags target an exact region.
image_sizeNostringautoauto, auto_1K, auto_1.5K, auto_2KResolution tier for the base image and layers. auto follows the input while preserving each element's aspect ratio. This also sets your price — see Pricing.
enhance_prompt_modeNostringstandardstandard, faststandard favours image quality; fast reduces generation time.
enable_safety_checkerNobooleantruetrue, falseRuns the safety checker on the input.

The response is many images, not one. A call returns a base image plus up to 16 separated layers — 2 to 17 in total. media_url is an array in that order, and a parallel layers array carries the metadata for each one: index, url, z_index, and (on every layer except the base) name, description and bounding_box. layers[i] always describes media_url[i].

The base layer is z_index 0 and is opaque; it carries no name, description or bounding_box, because those fields only describe an extracted element. Every other layer is a transparent PNG. Layers are ordered bottom to top by z_index, so drawing them in array order recomposes the image.

bounding_box gives the layer's position in the base image's coordinate system. It is not the dimensions of the returned PNG — a layer is delivered at its own natural size, which may differ from its box. Use the box to place the layer, not to size it.

Built for finished, composed images — product shots, posters, UI mockups, scenes with distinct objects. An image with nothing separable comes back as a base plus very few layers, and is billed for what it produced.

Pricing: billed per generated layer, at a rate set by the pixel area of the generated base layer: $0.03375 per layer under 1536×1536, $0.0675 per layer at or above it. A 10-layer result from a 1024×1024 base costs $0.3375. Because the layer count is decided by the model, the exact cost is not known before the call — a generous amount is reserved on submit and released down to the real charge when the job completes, so you are only ever charged for the layers you actually receive.

Example Request

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
  "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
  "image_size": "auto",
  "enable_safety_checker": true
}

Response

{
  "request_id": "seedream-5-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: $0.035"
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'seedream-5-0-pro-layerize' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "seedream-5-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-0-pro-layerize",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/seedream-5-0-pro_019d9b3e-9e95-75e3-7533-a5f1149cd9f94"

Response (Completed)

{
  "request_id": "seedream-5-0-pro_019d9b3e-9e95-75e3-7533-a5f1149cd9f94",
  "status": "COMPLETED",
  "model_id": "seedream-5-0-pro-layerize",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-0-pro_019d9b3e-9e95-75e3-7533-a5f1149cd9f94/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-04-17T11:41:06.171Z",
  "updated_at": "2026-04-17T11:41:57.000Z",
  "completed_at": "2026-04-17T11:41:57.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/jpeg or image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Seedream 5 Pro API Pricing

Your request will cost $0.0338 per generated layer.
a 10-layer result from a 1024x1024 base costs $0.3375
2. Seedream 5 Flash

Seedream 5 Flash API Documentation

  • Quick retouching: background swaps, relighting and cleanup at low cost.
  • Object insertion and replacement: place products or elements into an existing scene.
  • Multi-reference composition: combine up to 10 reference images (e.g. the outfit from one image on the person in another).
  • Variations at volume: many style-consistent edits of the same image for testing and campaigns.

Base URL

https://gateway.pixazo.ai/seedream-5-flash/v1/edit-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Seedream 5 Flash Edit generate request - Seedream 5 Flash Image Edit API

Request Code

POST https://gateway.pixazo.ai/seedream-5-flash/v1/edit-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "add sunglasses to the cat",
  "image": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"
  ],
  "size": "2K"
}
import requests

url = "https://gateway.pixazo.ai/seedream-5-flash/v1/edit-image"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "add sunglasses to the cat",
    "image": [
        "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"
    ],
    "size": "2K"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/seedream-5-flash/v1/edit-image';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  prompt: 'add sunglasses to the cat',
  image: [
    'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg'
  ],
  size: '2K'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/seedream-5-flash/v1/edit-image" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "add sunglasses to the cat",
    "image": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"],
    "size": "2K"
  }'

Output

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-flash",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-flash",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Seedream 5 Flash Edit generate request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—up to ~600 English words (recommended)Text instruction describing the edit to apply to the source image(s). The provider recommends keeping prompts under ~600 English words.
imageYesstring | array—URL or array of up to 10 URLsSource image(s) to edit — a single public image URL or an array of up to 10 reference-image URLs. Each image: JPEG, PNG, WEBP, BMP, TIFF, GIF or HEIC/HEIF; max 30 MB per file; width and height each > 14 px; total size up to 6000×6000 px; aspect ratio between 1:16 and 16:1.
sizeNostring2K1K, 2KOutput resolution tier. The model chooses the exact dimensions and aspect ratio to fit your prompt and inputs. Both tiers cost the same (see the pricing panel). Explicit pixel sizes are not accepted.
watermarkNobooleanfalsetrue, falseSet to true to add a small AI-generated watermark to the output image. Off by default.
output_formatNostringjpegpng, jpegEncoding of the generated image. Note: the gateway-hosted result URL always ends in .jpg regardless of format; the encoded bytes match your output_format choice.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image—JPG, PNG, WEBPImage(s) to edit.

Example Request

{
  "prompt": "add sunglasses to the cat",
  "image": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"
  ],
  "size": "2K"
}

Response

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: (the price of this request)"
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'seedream-5-flash' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-flash",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-flash",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-04-17T11:41:07.503Z",
  "updated_at": "2026-04-17T11:42:15.000Z",
  "completed_at": "2026-04-17T11:42:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/jpeg or image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Seedream 5 Flash API Pricing

ResolutionPrice (USD)
Per image (1K or 2K)$0.018 per image
Text to Image

Seedream 5 Flash API Documentation

  • Fast drafts and iteration: explore many prompt variations quickly and cheaply before committing to a final render.
  • High-volume content: social posts, thumbnails and catalog imagery at scale.
  • Product and marketing visuals: clean product shots and campaign variants on a budget.
  • Previews: try layouts and concepts before a Seedream 5 Flash final.

Base URL

https://gateway.pixazo.ai/seedream-5-flash/v1/text-to-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Seedream 5 Flash Text to Image generate request - Seedream 5 Flash Text to Image API

Request Code

POST https://gateway.pixazo.ai/seedream-5-flash/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
  "size": "2K"
}
import requests

url = "https://gateway.pixazo.ai/seedream-5-flash/v1/text-to-image"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
    "size": "2K"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/seedream-5-flash/v1/text-to-image';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  prompt: 'a majestic lion in a field of flowers, golden hour lighting, cinematic',
  size: '2K'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/seedream-5-flash/v1/text-to-image" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
    "size": "2K"
  }'

Output

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-flash",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-flash",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Seedream 5 Flash Text to Image generate request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—up to ~600 English words (recommended)Text prompt describing the image to generate. Be specific and descriptive for best results. The provider recommends keeping prompts under ~600 English words.
sizeNostring2K1K, 2KOutput resolution tier. The model chooses the exact dimensions and aspect ratio to fit your prompt and inputs. Both tiers cost the same (see the pricing panel). Explicit pixel sizes are not accepted.
watermarkNobooleanfalsetrue, falseSet to true to add a small AI-generated watermark to the output image. Off by default.
output_formatNostringjpegpng, jpegEncoding of the generated image. Note: the gateway-hosted result URL always ends in .jpg regardless of format; the encoded bytes match your output_format choice.

Example Request

{
  "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
  "size": "2K"
}

Response

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: (the price of this request)"
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'seedream-5-flash' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-flash",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-flash",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-04-17T11:41:06.171Z",
  "updated_at": "2026-04-17T11:41:57.000Z",
  "completed_at": "2026-04-17T11:41:57.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/jpeg or image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Seedream 5 Flash API Pricing

ResolutionPrice (USD)
Per image (1K or 2K)$0.018 per image
Layerize

Seedream 5 Flash API Documentation

https://gateway.pixazo.ai/seedream-5-0-flash/v1/layerize

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Seedream 5.0 Flash Layerize generate request - Seedream 5.0 Flash Layerize API

Request Code

POST https://gateway.pixazo.ai/seedream-5-0-flash/v1/layerize
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
  "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
  "image_size": "auto",
  "enable_safety_checker": true
}
import requests

url = "https://gateway.pixazo.ai/seedream-5-0-flash/v1/layerize"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
    "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
    "image_size": "auto",
    "enable_safety_checker": True
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/seedream-5-0-flash/v1/layerize';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  image_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png',
  prompt: 'a majestic lion in a field of flowers, golden hour lighting, cinematic',
  image_size: 'auto',
  enable_safety_checker: true
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/seedream-5-0-flash/v1/layerize" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
    "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
    "image_size": "auto",
    "enable_safety_checker": true
  }'

Output

{
  "request_id": "seedream-5-0-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-0-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "seedream-5-0-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-0-flash-layerize",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-0-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "seedream-5-0-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-0-flash-layerize",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Seedream 5.0 Flash Layerize generate request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
image_urlYesstring—HTTP(S) URL to an image; 512×512 – 6000×6000 px, aspect 1/16 – 16, ≤ 30 MBThe finished image to decompose. Must be publicly reachable.
promptNostring— (auto-detect elements)free text; may contain <bbox>left top right bottom</bbox> tagsWhich elements to separate. Leave empty and the model picks the major elements itself. Normalized <bbox> tags target an exact region.
image_sizeNostringautoauto, auto_1K, auto_1.5K, auto_2KResolution tier for the base image and layers. auto follows the input while preserving each element's aspect ratio.
enhance_prompt_modeNostringstandardstandard, faststandard favours image quality; fast reduces generation time.
enable_safety_checkerNobooleantruetrue, falseRuns the safety checker on the input.

The response is many images, not one. A call returns a base image plus up to 16 separated layers — 1 to 17 in total. media_url is an array in that order, and a parallel layers array carries the metadata for each one: index, url, z_index, and (on every layer except the base) name, description and bounding_box. layers[i] always describes media_url[i].

The base layer is z_index 0 and is opaque; it carries no name, description or bounding_box, because those fields only describe an extracted element. Every other layer is a transparent PNG. Layers are ordered bottom to top by z_index, so drawing them in array order recomposes the image.

bounding_box gives the layer's position in the base image's coordinate system. It is not the dimensions of the returned PNG — a layer is delivered at its own natural size, which may differ from its box. Use the box to place the layer, not to size it.

Built for finished, composed images — product shots, posters, UI mockups, scenes with distinct objects. An image with nothing separable comes back as a base plus very few layers, and is billed for what it produced.

Pricing: billed per output image — the base image and each separated layer count as one image each — at one flat rate at every image size; the current rate is in the pricing panel on this page. Because the layer count is decided by the model, the exact cost is not known before the call — the price of the maximum (17 images) is reserved on submit and released down to the real charge when the job completes, so you are only ever charged for the images you actually receive.

Example Request

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
  "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
  "image_size": "auto",
  "enable_safety_checker": true
}

Response

{
  "request_id": "seedream-5-0-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-0-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: (the price of this request)"
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'seedream-5-0-flash-layerize' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "seedream-5-0-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-0-flash-layerize",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/seedream-5-0-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "seedream-5-0-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-0-flash-layerize",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-0-flash_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-04-17T11:41:06.171Z",
  "updated_at": "2026-04-17T11:41:57.000Z",
  "completed_at": "2026-04-17T11:41:57.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/jpeg or image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Seedream 5 Flash API Pricing

Your request will cost $0.027 per image (the base image and each layer).
a base image plus 11 layers is billed as 12 images
3. Seedream 5 Lite

Seedream 5 Lite API Documentation

  • Background replacement: swap or clean up backgrounds with one instruction.
  • Add / remove objects: insert or erase elements described in plain text.
  • Style transfer & relighting: restyle photos or change lighting and mood.
  • Product variants: recolor or restyle a product shot for e-commerce listings.
  • Multi-reference composition: blend up to 14 reference images into one coherent scene (refs + outputs ≤ 15).

Base URL

https://gateway.pixazo.ai/seedream-5-lite/v1/edit-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Seedream 5 Lite Edit generate request - Seedream 5 Lite Image Edit API

Request Code

POST https://gateway.pixazo.ai/seedream-5-lite/v1/edit-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "add sunglasses to the cat",
  "image": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"
  ],
  "size": "2K"
}
import requests

url = "https://gateway.pixazo.ai/seedream-5-lite/v1/edit-image"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "add sunglasses to the cat",
    "image": [
        "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"
    ],
    "size": "2K"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/seedream-5-lite/v1/edit-image';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  prompt: 'add sunglasses to the cat',
  image: [
    'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg'
  ],
  size: '2K'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/seedream-5-lite/v1/edit-image" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "add sunglasses to the cat",
    "image": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"],
    "size": "2K"
  }'

Output

{
  "request_id": "seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-lite",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-lite",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Seedream 5 Lite Edit generate request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—up to ~600 English words (recommended)Text instruction describing the edit to apply to the source image(s). The provider recommends keeping prompts under ~600 English words.
imageYesstring | array—URL or array of up to 14 URLsSource image(s) to edit — a single public image URL or an array of up to 14 reference-image URLs. Each image: JPEG, PNG, WEBP, BMP, TIFF, GIF or HEIC/HEIF; max 30 MB per file; width and height each > 14 px; total size up to 6000×6000 px; aspect ratio between 1:16 and 16:1. Reference images + generated output images ≤ 15 per request.
sizeNostring2K2K, 3K, 4K; or WIDTHxHEIGHT in pixelsOutput resolution. Pass a tier (2K, 3K or 4K) and the model chooses the exact dimensions to fit your prompt, or pass explicit pixel dimensions such as 3840x2160. Explicit dimensions must have total pixels between 2560x1440 (3,686,400) and 4096x4096 (16,777,216) and an aspect ratio between 1:16 and 16:1.
watermarkNobooleanfalsetrue, falseSet to true to add a small AI-generated watermark to the output image. Off by default.
output_formatNostringjpegpng, jpegEncoding of the generated image. Note: the gateway-hosted result URL always ends in .jpg regardless of format; the encoded bytes match your output_format choice.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image—JPG, PNG, WEBPImage(s) to edit.

Example Request

{
  "prompt": "add sunglasses to the cat",
  "image": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg"
  ],
  "size": "2K"
}

Response

{
  "request_id": "seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: $0.035"
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'seedream-5-lite' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-lite",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-lite",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-04-17T11:41:07.503Z",
  "updated_at": "2026-04-17T11:42:15.000Z",
  "completed_at": "2026-04-17T11:42:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/jpeg or image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Seedream 5 Lite API Pricing

Your request will cost $0.035 per image.
Text to Image

Seedream 5 Lite API Documentation

  • Rapid concept art & mood boards: iterate visual ideas quickly (~30–40s per image).
  • Marketing & social creatives at scale: generate campaign and post imagery from copy.
  • E-commerce visuals: product lifestyle shots and category imagery without a studio.
  • Storyboards & keyframes: pre-visualise scenes for video and animation pipelines.
  • Blog & hero illustrations: headers and section art generated from the article brief.

Base URL

https://gateway.pixazo.ai/seedream-5-lite/v1/text-to-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Seedream 5 Lite Text to Image generate request - Seedream 5 Lite Text to Image API

Request Code

POST https://gateway.pixazo.ai/seedream-5-lite/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
  "size": "2K"
}
import requests

url = "https://gateway.pixazo.ai/seedream-5-lite/v1/text-to-image"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
    "size": "2K"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/seedream-5-lite/v1/text-to-image';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  prompt: 'a majestic lion in a field of flowers, golden hour lighting, cinematic',
  size: '2K'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/seedream-5-lite/v1/text-to-image" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
    "size": "2K"
  }'

Output

{
  "request_id": "seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "seedream-5-lite",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-lite",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Seedream 5 Lite Text to Image generate request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—up to ~600 English words (recommended)Text prompt describing the image to generate. Be specific and descriptive for best results. The provider recommends keeping prompts under ~600 English words.
sizeNostring2K2K, 3K, 4K; or WIDTHxHEIGHT in pixelsOutput resolution. Pass a tier (2K, 3K or 4K) and the model chooses the exact dimensions to fit your prompt, or pass explicit pixel dimensions such as 3840x2160. Explicit dimensions must have total pixels between 2560x1440 (3,686,400) and 4096x4096 (16,777,216) and an aspect ratio between 1:16 and 16:1.
watermarkNobooleanfalsetrue, falseSet to true to add a small AI-generated watermark to the output image. Off by default.
output_formatNostringjpegpng, jpegEncoding of the generated image. Note: the gateway-hosted result URL always ends in .jpg regardless of format; the encoded bytes match your output_format choice.

Example Request

{
  "prompt": "a majestic lion in a field of flowers, golden hour lighting, cinematic",
  "size": "2K"
}

Response

{
  "request_id": "seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: $0.035"
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'seedream-5-lite' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "seedream-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "seedream-5-lite",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/seedream-5-lite_019d9b3e-9e95-75e3-7533-a5f1149cd9f94"

Response (Completed)

{
  "request_id": "seedream-5-lite_019d9b3e-9e95-75e3-7533-a5f1149cd9f94",
  "status": "COMPLETED",
  "model_id": "seedream-5-lite",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-lite_019d9b3e-9e95-75e3-7533-a5f1149cd9f94/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-04-17T11:41:06.171Z",
  "updated_at": "2026-04-17T11:41:57.000Z",
  "completed_at": "2026-04-17T11:41:57.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/jpeg or image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Seedream 5 Lite API Pricing

Your request will cost $0.035 per image.
4. Seedream 4.5

Seedream 4.5 API Documentation

https://gateway.pixazo.ai/byteplus/v1/getEditImage

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Seedream 4.5 Image to Image (Edit Image)

Request Code

POST https://gateway.pixazo.ai/byteplus/v1/getEditImage
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "model": "seedream-4-5-251128",
  "prompt": "Make the cat eye blue",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg",
  "size": "2K",
  "guidance_scale": 6,
  "seed": 42
}
import requests

url = "https://gateway.pixazo.ai/byteplus/v1/getEditImage"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "model": "seedream-4-5-251128",
    "prompt": "Make the cat eye blue",
    "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg",
    "size": "2K",
    "guidance_scale": 6,
    "seed": 42
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/byteplus/v1/getEditImage';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  model: "seedream-4-5-251128",
  prompt: "Make the cat eye blue",
  image: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg",
  size: "2K",
  guidance_scale: 6,
  seed: 42
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/byteplus/v1/getEditImage" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
  "model": "seedream-4-5-251128",
  "prompt": "Make the cat eye blue",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg",
  "size": "2K",
  "guidance_scale": 6,
  "seed": 42
}'

Output

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your request to receive a POST callback instead of polling.

X-Webhook-URL: https://your-server.com/webhook/callback

Request Parameters - Seedream 4.5 Image to Image (Edit Image)

ParameterRequiredTypeDefaultAllowed values / rangeDescription
modelYesstring—seedream-4-5-251128, seededit-3-0-i2i-250628Model ID. Use seedream-4-5-251128 for Seedream 4.5, or seededit-3-0-i2i-250628 for Seededit 3.0.
promptYesstring—up to ~600 English words (recommended)Text prompt describing the edit to apply to the image. The provider recommends keeping prompts under ~600 English words.
imageYesstring or array—URL or data:image/<format>;base64,...The image(s) to edit — an accessible URL or a Base64 data URL (format name lowercase). Seedream 4.5 accepts jpeg, png, webp, bmp, tiff, gif, heic and heif; each image up to 30 MB, aspect ratio between 1/16 and 16, total pixels up to 6000x6000. Pass an array to use multiple reference images (up to 14).
sizeNostring2048x20482K, 4K, 2048x2048, 4096x2304, 2304x4096, 3840x2160, 2560x1440Output size. For Seedream 4.5 pass a tier (2K or 4K) or explicit pixel dimensions with total pixels between 2560x1440 (3,686,400) and 4096x4096 (16,777,216) and an aspect ratio between 1/16 and 16. Seededit 3.0 supports adaptive.
seedNointeger-1[-1, 2147483647]Random seed controlling output randomness. -1 (or unset) picks a random seed. Note: BytePlus lists seed as officially supported only on Seedream 3.0 (seedream-3-0-t2i); Seedream 4.5 may ignore it, and identical seeds are not guaranteed to reproduce identical images.
guidance_scaleNofloat—[1, 10]Controls how closely the output follows your prompt (prompt adherence); higher values stick more strictly to the prompt. Note: per BytePlus this parameter is not supported by Seedream 4.5/4.0 — it applies to Seedream 3.0 (default 2.5) and Seededit models only.
sequential_image_generationNostringdisabledauto, disabledBatch image generation (Seedream 4.5 only). auto lets the model decide whether to return a set of thematically related images (and how many) based on your prompt; disabled generates a single image.
sequential_image_generation_optionsNoobject{"max_images": 15}max_images: [1, 15]Options for batch generation; effective only when sequential_image_generation is auto. max_images caps how many images are generated in one request (input reference images plus generated images must total 15 or fewer).
streamNobooleanfalsetrue, falseProvider streaming mode — each output image is returned as soon as it is generated. Leave false on the gateway; results are delivered via the polling URL or webhook.
response_formatNostringurlurl, b64_jsonProvider-side return format (url links expire after 24 hours). Deprecated for the queue flow — the gateway response always contains permanent R2 URL(s) in output.media_url.
watermarkNobooleantruetrue, falseWhen true (provider default), adds an "AI generated" watermark to the bottom-right corner of the image. Set false for clean output.
optimize_prompt_optionsNoobject{"mode": "standard"}mode: standardPrompt-optimization settings (Seedream 4.5 only). Seedream 4.5 supports only standard mode (higher quality, longer generation time); fast is not supported for this model.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBP · < 10 MBImage to edit.

Example Request

{
  "model": "seedream-4-5-251128",
  "prompt": "Make the cat eye blue",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg",
  "size": "2K",
  "guidance_scale": 6,
  "seed": 42
}

Response

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderValue
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: $0.04"
}

Error via Status/Webhook

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "byteplus",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "byteplus",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1776429228529-aq8fsc3s5k7-1.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-04-17T12:33:13.000Z",
  "updated_at": "2026-04-17T12:33:13.000Z",
  "completed_at": "2026-04-17T12:33:13.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/jpeg)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a request to the API endpoint above
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use the X-Webhook-URL header to receive a callback instead of polling.

Seedream 4.5 API Pricing

Your request will cost $0.04 per image.
Text to Image

Seedream 4.5 API Documentation

https://gateway.pixazo.ai/byteplus/v1/getTextToImage

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Seedream 4.5 Text to Image

Request Code

POST https://gateway.pixazo.ai/byteplus/v1/getTextToImage
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "model": "seedream-4-5-251128",
  "prompt": "a fisheye close-up of a cat face, playful dramatic effect",
  "size": "2K",
  "seed": 42
}
import requests

url = "https://gateway.pixazo.ai/byteplus/v1/getTextToImage"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "model": "seedream-4-5-251128",
    "prompt": "a fisheye close-up of a cat face, playful dramatic effect",
    "size": "2K",
    "seed": 42
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/byteplus/v1/getTextToImage';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  model: "seedream-4-5-251128",
  prompt: "a fisheye close-up of a cat face, playful dramatic effect",
  size: "2K",
  seed: 42
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/byteplus/v1/getTextToImage" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
  "model": "seedream-4-5-251128",
  "prompt": "a fisheye close-up of a cat face, playful dramatic effect",
  "size": "2K",
  "seed": 42
}'

Output

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your request to receive a POST callback instead of polling.

X-Webhook-URL: https://your-server.com/webhook/callback

Request Parameters - Seedream 4.5 Text to Image

ParameterRequiredTypeDefaultAllowed values / rangeDescription
modelYesstring—seedream-4-5-251128Model ID. Use seedream-4-5-251128 for Seedream 4.5.
promptYesstring—up to ~600 English words (recommended)Text prompt describing the image to generate. The provider recommends keeping prompts under ~600 English words — overly long prompts can scatter detail.
sizeNostring2048x20482K, 4K, 2048x2048, 4096x2304, 2304x4096, 3840x2160, 2560x1440Output resolution. Pass a tier (2K or 4K) and the model picks the exact dimensions to fit your prompt, or pass explicit pixel dimensions such as 3840x2160. Explicit dimensions must have total pixels between 2560x1440 (3,686,400) and 4096x4096 (16,777,216) and an aspect ratio between 1/16 and 16.
seedNointeger-1[-1, 2147483647]Random seed controlling output randomness. -1 (or unset) picks a random seed. Note: BytePlus lists seed as officially supported only on Seedream 3.0 (seedream-3-0-t2i); Seedream 4.5 may ignore it, and identical seeds are not guaranteed to reproduce identical images.
sequential_image_generationNostringdisabledauto, disabledBatch image generation. auto lets the model decide whether to return a set of thematically related images (and how many) based on your prompt; disabled generates a single image.
sequential_image_generation_optionsNoobject{"max_images": 15}max_images: [1, 15]Options for batch generation; effective only when sequential_image_generation is auto. max_images caps how many images are generated in one request (input reference images plus generated images must total 15 or fewer).
streamNobooleanfalsetrue, falseProvider streaming mode — each output image is returned as soon as it is generated. Leave false on the gateway; results are delivered via the polling URL or webhook.
response_formatNostringurlurl, b64_jsonProvider-side return format (url links expire after 24 hours). Deprecated for the queue flow — the gateway response always contains permanent R2 URL(s) in output.media_url.
watermarkNobooleantruetrue, falseWhen true (provider default), adds an "AI generated" watermark to the bottom-right corner of the image. Set false for clean output.
optimize_prompt_optionsNoobject{"mode": "standard"}mode: standardPrompt-optimization settings. Seedream 4.5 supports only standard mode (higher quality, longer generation time); fast is not supported for this model.

Example Request

{
  "model": "seedream-4-5-251128",
  "prompt": "a fisheye close-up of a cat face, playful dramatic effect",
  "size": "2K",
  "seed": 42
}

Response

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderValue
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: $0.04"
}

Error via Status/Webhook

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "byteplus",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "byteplus",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1776429228529-aq8fsc3s5k7-1.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-04-17T12:33:13.000Z",
  "updated_at": "2026-04-17T12:33:13.000Z",
  "completed_at": "2026-04-17T12:33:13.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/jpeg)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a request to the API endpoint above
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use the X-Webhook-URL header to receive a callback instead of polling.

Seedream 4.5 API Pricing

Your request will cost $0.04 per image.
5. Seedream 4

Seedream 4 API Documentation

https://gateway.pixazo.ai/byteplus/v1/getEditMultiImage

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Seedream 4 Multi-Image Edit

Request Code

POST https://gateway.pixazo.ai/byteplus/v1/getEditMultiImage
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "Girl holding the cat",
  "image": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png"
  ]
}
import requests

url = "https://gateway.pixazo.ai/byteplus/v1/getEditMultiImage"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "Girl holding the cat",
    "image": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg","https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png"]
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/byteplus/v1/getEditMultiImage';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  prompt: "Girl holding the cat",
  image: ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg","https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png"]
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/byteplus/v1/getEditMultiImage" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
  "prompt": "Girl holding the cat",
  "image": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png"
  ]
}'

Output

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your request to receive a POST callback instead of polling.

X-Webhook-URL: https://your-server.com/webhook/callback

Request Parameters - Seedream 4 Multi-Image Edit

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——Text prompt describing how to combine or edit the reference images. Keep it under 600 English words; overly long prompts may lose detail.
imageYesarray<string>—2-10 imagesArray of 2-10 reference images, each a publicly accessible URL or a Base64 data URL (data:image/<format>;base64,...). Formats: jpeg, png, webp, bmp, tiff, gif, heic, heif; up to 30 MB per image.
modelNostringSeedream 4.0—Model ID. Defaults to Seedream 4.0 multi-image editing (seedream-4-0-250828).
sizeNostring—1K, 2K, 4K, or <width>x<height>Output size. Use a resolution preset (describe the aspect ratio in your prompt) or exact pixels (e.g. 2048x2048). Total output pixels must fall within [1280x720, 4096x4096].
seedNointeger-1[-1, 2147483647]Random seed for reproducibility. Note: current BytePlus docs list seed as effective only for seedream-3-0-t2i; Seedream 4.0 may ignore it.
sequential_image_generationNostringdisabledauto, disabledBatch (image-set) generation. auto lets the model return a set of related images based on your prompt; disabled generates a single image.
sequential_image_generation_optionsNoobject—max_images: [1, 15]Options for batch generation (used when sequential_image_generation is auto). max_images (default 15) caps the generated images; reference images + generated images must total 15 or fewer.
optimize_prompt_optionsNoobject—mode: standard, fastPrompt-optimization settings. mode defaults to standard (higher quality, slower); fast is quicker with more average quality.
response_formatNostringurlurl, b64_jsonDeprecated for queue flow — the final image is always returned as an R2 URL in output.media_url.
watermarkNobooleantruetrue, falseWhen true, adds an "AI generated" watermark to the bottom-right corner. Set false to disable.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image—JPG, PNG, WEBP · < 10 MBImages to edit (2+).

Example Request

{
  "prompt": "Girl holding the cat",
  "image": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1757499948018-hntkjsg9kj.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/model.png"
  ]
}

Response

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderValue
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: $0.04"
}

Error via Status/Webhook

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "byteplus",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "byteplus_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "byteplus",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/byteplus/1776429228529-aq8fsc3s5k7-1.jpg"
    ],
    "media_type": "image/jpeg"
  },
  "created_at": "2026-04-17T12:33:13.000Z",
  "updated_at": "2026-04-17T12:33:13.000Z",
  "completed_at": "2026-04-17T12:33:13.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (image/jpeg)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a request to the API endpoint above
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use the X-Webhook-URL header to receive a callback instead of polling.

Seedream 4 API Pricing

Your request will cost $0.03 per image.

⚡ Performance

Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).

Show data for the last
Generations
150,500last 30d
~5,017 per day
Success rate
96.4%
of completed generations
Generation time
109.6savg
p95 3.4min
Requests
Sep 5max 32,300Oct 4
Seedream 5 LiteAvg 3,140/day
Seedream 5 ProAvg 990/day
Seedream 4.5 / Seedream 4Avg 873/day
Seedream 5 FlashAvg 13/day
Generation Time
Sep 5max 7.5minOct 4
Seedream 5 LiteAvg 95.0s
Seedream 5 ProAvg 107.5s
Seedream 4.5 / Seedream 4Avg 2.9min
Seedream 5 FlashAvg 61.7s
Error Rate
Sep 5max 57.1%Oct 4
Seedream 5 LiteAvg 4.8%
Seedream 5 ProAvg 1.8%
Seedream 4.5 / Seedream 4Avg 0.9%
Seedream 5 FlashAvg 0.0%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
96.41%
across all generations of this model family
Uptime
Sep 5max 100%Oct 4
Seedream 5 LiteAvg 95.18%
Seedream 5 ProAvg 98.18%
Seedream 4.5 / Seedream 4Avg 99.08%
Seedream 5 FlashAvg 100.00%