spiderai
Log inGet an API key

DOC 10APIs and capabilities

Seedream 5.5 Image Guide

Generate images with Seedream 5.5: a first image in one command, then sizes and ratios, reference images, transparent backgrounds, layer splitting and billing.

Tested 2026-11-30 · seedream-5-5

Seedream 5.5 is ByteDance’s image model. On spiderai it is served by the Seedream Images group and billed per image. Start with one command for a first image, then see how to set sizes, pass reference images, get a transparent background and split a picture into layers.

Before you start

  • Open API Keys and create a key in the Seedream Images group. Keys from other groups cannot call this model.
  • The model name is seedream-5-5. Send it with every request.
  • The endpoint is https://api.spiderai.fun. Send the header Authorization: Bearer <your key>.
EntryPathWhen to use it
GeneralPOST /v1/images/generationsUse this in most cases: sizes can be given as a ratio, reference images are passed as links, and ready-made image tools take this address too.
Upload local filesPOST /v1/images/editsWhen the reference image is a file on your machine, upload it as a form.
AsynchronousPOST /v1/images/generations/asyncFor slow requests: returns a task ID at once, the result is fetched later.
Volcengine Ark nativePOST /api/v3/images/generationsSame parameters and response as the official Volcengine Ark documentation: with existing official code, change only the address and the key.

Your first image

Replace YOUR_API_KEY with your key. One image usually takes about 10 seconds; set the client timeout to 180 seconds.

BASH
curl https://api.spiderai.fun/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5-5",
    "prompt": "An orange cat sunbathing on a windowsill, film grain, warm tones",
    "size": "1920x1080"
  }'

In the response, data[0].url is the picture, data[0].size is the actual width × height, and usage holds the counts this request is billed for:

JSON
{
  "model": "doubao-seedream-5-5-261028",
  "created": 1796042673,
  "data": [
    { "url": "https://…/….png?…", "size": "1920x1080", "output_format": "png", "background": "opaque" }
  ],
  "usage": { "input_images": 0, "generated_images": 1, "output_tokens": 8100, "total_tokens": 8100 }
}
Note
The image link is temporary. It stops working after about 24 hours, so download the picture as soon as you get it.

Choosing a size

  • Exact pixels: "size": "1920x1080". Width × height must be between 921,600 and 8,294,400 pixels, with an aspect ratio of at most 16:1.
  • A ratio plus a tier (general entry): "size": "16:9" with "resolution": "1.5K" is turned into the pixels in the table below; without resolution the 2K column applies.
  • No size: the image is 2048×2048.
Ratio1K1.5K2K3K
1:11024x10241536x15362048x20482880x2880
16:91280x7201920x10802560x14403840x2160
9:16720x12801080x19201440x25602160x3840
4:31152x8641728x12962304x17283200x2400
3:4864x11521296x17281728x23042400x3200
3:21248x8321920x12802496x16643456x2304
2:3832x12481280x19201664x24962304x3456
21:91512x6482268x9723024x12964200x1800
2:11440x7202048x10242880x14404000x2000
1:2720x14401024x20481440x28802000x4000

The price depends only on which tier the actual pixels of the output fall into, not on how you wrote the size. Under Image models on Pricing you can pick a ratio and a tier and read the size to send and the price of that image.

Reference images

A request can carry up to 10 reference images, to edit a picture or to blend several into one. Reference images are billed per image on top of the output.

seedream_ref.py
import json, urllib.request

API_KEY = "YOUR_API_KEY"
body = {
    "model": "seedream-5-5",
    "prompt": "Replace the background of image 1 with the pattern from image 2 and keep the subject unchanged",
    "image": ["https://spiderai.fun/og.png", "https://spiderai.fun/logo.png"],   # 1 to 10 pictures; their order is image 1, image 2 …
    "size": "16:9",
    "resolution": "1.5K",
}
req = urllib.request.Request(
    "https://api.spiderai.fun/v1/images/generations",
    data=json.dumps(body).encode("utf-8"),
    headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
)
with urllib.request.urlopen(req, timeout=180) as resp:
    result = json.load(resp)
print(result["data"][0]["url"])
print(result["usage"])   # input_images = the reference images billed for this request

Transparent background

Add "background": "transparent" and "output_format": "png" to get a PNG with an alpha channel directly, with no cut-out step.

BASH
curl https://api.spiderai.fun/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5-5",
    "prompt": "A glassy blue fox badge with a thin white outline, a single isolated subject",
    "size": "1024x1024",
    "background": "transparent",
    "output_format": "png"
  }'

Layer splitting

Send one poster or design, switch on layer_decomposition, and you get back a base image with the gaps filled in plus several transparent layers, each with a name, a description and a position.

BASH
curl https://api.spiderai.fun/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5-5",
    "image": "https://spiderai.fun/og.png",
    "layer_decomposition": true,
    "layer_decomposition_options": { "max_images": 4 }
  }'
  • Billed per returned image: the base image and every layer count as one image each, plus one reference image. max_images (2 to 100, default 30) caps how many are returned, and with it the cost.
  • Exactly one input image; size must be omitted or one of 1K, 1.5K, 2K; background cannot be used at the same time.
  • A layer’s position is in bounding_box.absolute: left, top, right and bottom in pixels, ready for placing the layer back on the base image.

Asynchronous requests

Slow requests such as layer splitting can be sent asynchronously: you get a task ID at once and fetch the result with it a little later, without keeping the connection open. The body is the same as for the synchronous endpoint; only the address ends in /async.

BASH
curl https://api.spiderai.fun/v1/images/generations/async \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5-5",
    "image": "https://spiderai.fun/og.png",
    "layer_decomposition": true,
    "layer_decomposition_options": { "max_images": 4 }
  }'

The reply comes back immediately with HTTP 202 and a task_id:

JSON
{
  "object": "image.generation.task",
  "task_id": "imgtask_d0049e2bb7364a4baa70d0e71ac42fcb",
  "status": "processing",
  "poll_url": "/v1/images/tasks/imgtask_d0049e2bb7364a4baa70d0e71ac42fcb",
  "created_at": 1796046134,
  "expires_at": 1796132534
}

Then ask for the result with the same key (the reply below shows only the first two images):

BASH
curl https://api.spiderai.fun/v1/images/tasks/imgtask_d0049e2bb7364a4baa70d0e71ac42fcb \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "object": "image.generation.task",
  "task_id": "imgtask_d0049e2bb7364a4baa70d0e71ac42fcb",
  "status": "completed",
  "http_status": 200,
  "image_url": "https://…/….png?…",
  "result": {
    "model": "doubao-seedream-5-5-261028",
    "data": [
      { "url": "https://…/….png?…", "size": "1413x742", "z_index": 0, "background": "opaque" },
      { "url": "https://…/….png?…", "size": "1033x1015", "z_index": 1, "background": "transparent", "name": "…",
        "bounding_box": { "absolute": [101, 165, 513, 570], "normalized": [71, 222, 363, 768] } }
    ],
    "usage": { "input_images": 1, "generated_images": 4 }
  },
  "created_at": 1796046134,
  "completed_at": 1796046152,
  "expires_at": 1796132552
}
  • While status is processing, ask again every 3 seconds or so. When it is completed, result holds the same response as the synchronous endpoint. failed means the request failed, and a failed task is not billed.
  • Use the key that submitted the task; other keys cannot see it.
  • Results are kept for 24 hours.
  • To upload local files asynchronously, use POST /v1/images/edits/async.
  • Asynchronous and synchronous requests cost the same. GPT and Grok image models can be submitted this way too.

If you already have Volcengine Ark code

The native entry does not rewrite parameters: write the body as in the official documentation, and change the address and the key to spiderai’s. On this entry size is exact pixels, or 1K, 1.5K or 2K.

BASH
curl https://api.spiderai.fun/api/v3/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5-5",
    "prompt": "An orange cat sunbathing on a windowsill, film grain, warm tones",
    "size": "2K"
  }'

Billing

  • Output images are billed per image; the price depends on which tier the width × height falls into (1K, 1.5K, 2K, 3K).
  • Reference images are billed per image, for as many as you send.
  • Prompts are not billed separately.
  • Per-tier prices are under Image models on Pricing.

Common errors

MessageCause and fix
No available Seedream accountsmodel is missing, or it is not seedream-5-5.
… only supported for seedream groupsThe native entry was called with a key from another group. Use a key from the Seedream Images group.
… requires total pixels within [921600, 8294400]The size is too small or too large; pick one from the table above.
… does not support n > 1 …One request returns one image; send several requests for several images.
… cannot combine background=transparent with output_format=jpegA transparent background needs PNG.
… layer_decomposition=true requires exactly 1 input imageLayer splitting takes exactly one input image.
image task not foundThe task ID is wrong, older than 24 hours, or the key is not the one that submitted the task.

For general errors such as insufficient balance or an invalid key, see Troubleshooting.