घर ब्लॉग

How to Use the Seedream 5.0 Flash API

Seedream 5.0 Flash API blog cover

Sep 29, 2026

EmpirioLabs AI

खुलासा: This article was written with AI assistance and reviewed by EmpirioLabs AI.

Seedream 5.0 Flash is available on EmpirioLabs. It is ByteDance's fast Seedream image model for text-to-image generation, edits that combine up to 10 reference images, precise edits placed with coordinates or drawn markers, and layer decomposition, which splits one image into a base image plus up to 16 transparent layers. It works in the API and in the Playground.

Watch the launch film

Every image in the film is a real Seedream 5.0 Flash output. The score was generated by ACE-Step on EmpirioLabs.

What it supports

  • Text-to-image. Send a prompt with no image.
  • Editing and fusion. Attach one to ten images and describe the change, or how to combine them.
  • Marker and coordinate edits. Mark the area to change on the input image with a circle, arrow or sketch, or give its exact position as a <bbox> tag in the prompt.
  • Layer decomposition. Split one image into a base image plus up to 16 transparent PNG layers, each returned with its position in the base image, a name and a description.
  • Transparent backgrounds. Edit one image that already has an alpha channel and keep the transparency in the result.
  • Text in the image. Signs, labels and posters render in Chinese, English and 14 other languages, including Japanese, Korean, Arabic, Spanish and French.

Output is PNG or JPEG at the 1K, 1.5K or 2K resolution tier, or at a custom width and height.

Generate an image

curl https://api.empiriolabs.ai/v1/images/generations \
  -H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5-0-flash",
    "prompt": "A paper lantern festival over a river at dusk, reflections on the water",
    "aspect_ratio": "16:9",
    "quality": "2K",
    "sync": true
  }'

Sync and async. With "sync": true the request stays open and returns the finished image in data. Without it, the response is a job with a job_id and a poll_url. Poll GET /v1/jobs/<job_id> until status is completed.

The same call from the OpenAI Python SDK, pointed at EmpirioLabs. Controls that the SDK does not define go in extra_body:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.empiriolabs.ai/v1",
    api_key="YOUR_EMPIRIOLABS_API_KEY",
)

result = client.images.generate(
    model="seedream-5-0-flash",
    prompt="A paper lantern festival over a river at dusk, reflections on the water",
    extra_body={"sync": True, "aspect_ratio": "16:9", "quality": "2K"},
)

print(result.data[0].url)

Edit with reference images

Pass up to 10 image URLs, data URIs or uploaded images in image, and refer to them in the prompt by their order:

{
  "model": "seedream-5-0-flash",
  "prompt": "Place the cup from image 1 onto the table from image 2, keeping the lighting of image 2",
  "image": [
    "https://example.com/cup.png",
    "https://example.com/table.jpg"
  ],
  "sync": true
}

Edit a marked area

To change one part of an image, mark it on the input with a circle, arrow or sketch and describe the change, or give the area as a <bbox> tag. A box is left top right bottom on a 0 to 1000 grid over the image, whatever its pixel size:

{
  "model": "seedream-5-0-flash",
  "prompt": "Add a small glass vase with a single white tulip inside <bbox>60 80 300 520</bbox>. Keep everything else unchanged.",
  "image": "https://example.com/kitchen.png",
  "sync": true
}

Tags also work across images, for example to place the subject from a region of image 1 at a region of image 2.

Split an image into layers

Set layer_decomposition to true and attach exactly one image. The prompt is optional: leave it out to let the model choose the elements, or name the elements or regions to separate.

curl https://api.empiriolabs.ai/v1/images/generations \
  -H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5-0-flash",
    "layer_decomposition": true,
    "image": "https://example.com/perfume-ad.png",
    "prompt": "Separate the perfume bottle, its label and the light beam",
    "sync": true
  }'

data[0] is the base image, with a z_index of 0. Each entry after it is a transparent PNG layer with its stacking order, its box in the base image in pixels (bounding_box.absolute) and on the 0 to 1000 grid (bounding_box.normalized), both as [left, top, right, bottom], and a name and description:

{
  "url": "https://media.empiriolabs.ai/...",
  "z_index": 4,
  "width": 476,
  "height": 1024,
  "bounding_box": {
    "absolute": [1181, 268, 1657, 1292],
    "normalized": [419, 169, 588, 815]
  },
  "name": "Perfume bottle main body",
  "description": "A transparent square perfume bottle with a faceted gold cap..."
}

Stack the layers over the base image in ascending z_index order to rebuild it, or move, resize, recolor or replace any layer first. A layer can also be the input to a new request, for example to recolor one element and keep its transparency.

Things to know before your first request

  • One image per request. A request returns one image, and n above 1 returns an error. Send separate requests for variations. Layer decomposition is the exception: it returns the base image and its layers together.
  • Scale each layer to its box. A layer PNG is not always the size of its footprint in the base image, and a text layer can come back several times larger. Scale each layer to the width and height of its bounding_box.absolute before placing it at the box's top-left corner.
  • The prompt decides how many layers come back. With no prompt the model separates every element it finds, and each returned image bills. Name the elements you need, or give their regions as <bbox> tags, to keep the result to those.
  • Retry a layer decomposition that could not be processed. A layer decomposition occasionally fails with an error saying the image content could not be processed. Send the same request again.
  • There is no fast prompt optimization. prompt_optimization_mode: "fast" from Seedream 5.0 Pro returns an error on Flash. Leave the control out.
  • A transparent result needs a transparent input. background: "transparent" works on an edit of exactly one image that already has an alpha channel, such as a layer from a decomposition, with output_format set to png. JPEG output returns an error.

मूल्य निर्धारण

Per image. Seedream 5.0 Flash is pay as you go and billed per returned image, at one rate for every resolution tier. Reference images add no charge. A layer decomposition bills each image it returns, the base image and every layer, at the same rate. No subscription is required. Current rates are on the model page and the pricing page.

Content safety. Generated images pass an automated content-safety check. An image flagged as explicit is not returned, and because it was generated before the check ran, it is still billed.

Start building

Try Seedream 5.0 Flash in the Playground, read the full parameter reference in the API docs, or compare it with the other image models in the model catalog. For the Pro tier of the same family, see How to Use the Seedream 5.0 Pro API.

बेहतर समापन बिंदुओं का उपयोग करने के लिए तैयार हैं?

हमारे मॉडलों का अन्वेषण करें, या व्यावसायिक पूछताछ, कस्टम परिनियोजन, या किसी भी अन्य चीज़ के बारे में हमसे संपर्क करें।