> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Seedream 5.0 Flash

> Generate, edit, combine, preserve transparency, and decompose images into editable layers with Seedream 5.0 Flash.

Seedream 5.0 Flash is ByteDance's faster, lower-cost model for image generation and editing. Use model ID `doubao-seedream-5-0-flash-260915` with AnyFast's `POST /v1/images/generations` endpoint. The upstream model supports text-to-image generation, single- and multi-image editing, transparent-background editing, and layer decomposition.

<Warning>Seedream 5.0 Flash generates one image per normal generation request. It does not support grouped image generation, web search, or streaming. Do not send `sequential_image_generation`, `sequential_image_generation_options`, `tools`, or `stream`.</Warning>

## Key capabilities

* **Text to image** — Generate one image from a text prompt
* **Image editing and fusion** — Edit one reference or combine content and style from up to 10 references
* **Interactive editing** — Point to regions with natural language, markers, points, bounding boxes, arrows, or sketches
* **Transparent background** — Preserve an alpha channel in a single-image editing workflow
* **Layer decomposition** — Split one image into a background plus up to 16 editable transparent PNG layers
* **Multilingual text** — In addition to Chinese and English, supports Russian, Arabic, Filipino, Thai, Turkish, Korean, Malay, Spanish, Portuguese, Indonesian, French, German, Vietnamese, and Japanese prompts

<Tabs sync={false}>
  <Tab title="Text to image">
    ## Generate from text

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://www.anyfast.ai/v1/images/generations \
        -H "Authorization: Bearer YOUR_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "doubao-seedream-5-0-flash-260915",
          "prompt": "A premium product photograph of a white ceramic cup on a light gray background, centered composition, soft shadow, no text",
          "size": "1.5K",
          "response_format": "url",
          "output_format": "jpeg",
          "watermark": false
        }'
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          "https://www.anyfast.ai/v1/images/generations",
          headers={
              "Authorization": "Bearer YOUR_API_KEY",
              "Content-Type": "application/json",
          },
          json={
              "model": "doubao-seedream-5-0-flash-260915",
              "prompt": "A premium product photograph of a white ceramic cup on a light gray background, centered composition, soft shadow, no text",
              "size": "1.5K",
              "response_format": "url",
              "output_format": "jpeg",
              "watermark": False,
          },
      )

      print(response.json())
      ```
    </CodeGroup>

    `size` accepts `1K`, `1.5K`, `2K`, or a valid explicit `widthxheight` value. Flash supports only `standard` prompt optimization; do not send `optimize_prompt_options.mode: "fast"`.
  </Tab>

  <Tab title="Image editing">
    ## Edit or combine references

    ```bash cURL theme={null}
    curl https://www.anyfast.ai/v1/images/generations \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "doubao-seedream-5-0-flash-260915",
        "prompt": "Use the composition of image 1 and the visual style of image 2.",
        "image": [
          "https://example.com/composition.png",
          "https://example.com/style.png"
        ],
        "size": "1K",
        "output_format": "jpeg",
        "watermark": false
      }'
    ```

    `image` accepts a URL, a Base64 data URI, or an array of up to 10 references. In the prompt, refer to images by their array order, such as “image 1” and “image 2.”

    For coordinate-based editing, use coordinates in a 1000 × 1000 normalized coordinate system:

    ```json Coordinate-based edit theme={null}
    {
      "model": "doubao-seedream-5-0-flash-260915",
      "prompt": "Place the subject from image 1 <bbox>179 283 796 986</bbox> into image 2 <bbox>118 331 933 871</bbox>.",
      "image": [
        "https://example.com/source.png",
        "https://example.com/target.png"
      ],
      "size": "2K",
      "output_format": "png"
    }
    ```
  </Tab>

  <Tab title="Transparent background">
    ## Preserve transparency

    ```bash cURL theme={null}
    curl https://www.anyfast.ai/v1/images/generations \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "doubao-seedream-5-0-flash-260915",
        "prompt": "Keep the subject and refine the edges while preserving the transparent background.",
        "image": "https://example.com/transparent-source.png",
        "background": "transparent",
        "size": "1K",
        "output_format": "png",
        "watermark": false
      }'
    ```

    Transparent mode is available only for image-to-image requests with exactly one input image that already has an alpha channel. Use `output_format: "png"`; JPEG input or output is not compatible with transparency.
  </Tab>

  <Tab title="Layer decomposition">
    ## Split an image into layers

    ```bash cURL theme={null}
    curl https://www.anyfast.ai/v1/images/generations \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "doubao-seedream-5-0-flash-260915",
        "prompt": "Separate the green leaf icon from the white background into one editable layer.",
        "image": "https://example.com/green-leaf.jpeg",
        "layer_decomposition": true,
        "size": "1K",
        "response_format": "url",
        "output_format": "jpeg",
        "watermark": false
      }'
    ```

    Layer decomposition accepts exactly one PNG or JPEG. It returns one background image and up to 16 transparent PNG layers. The background follows `output_format`; every extracted layer is PNG and includes `z_index`, `bounding_box`, `name`, and `description` metadata.

    ```json Response shape theme={null}
    {
      "model": "dola-seedream-5-0-flash-260915",
      "created": 1792129605,
      "data": [
        {
          "url": "https://example.com/seedream-flash-layer-0.jpeg",
          "size": "1024x1024",
          "output_format": "jpeg",
          "z_index": 0
        },
        {
          "url": "https://example.com/seedream-flash-layer-1.png",
          "size": "662x855",
          "output_format": "png",
          "z_index": 1,
          "bounding_box": {
            "absolute": [
              305,
              251,
              729,
              800
            ],
            "normalized": [
              298,
              245,
              711,
              780
            ]
          },
          "name": "green leaf icon",
          "description": "Extract the complete green leaf icon with leaf blade, veins and petiole, no other background elements included"
        }
      ],
      "usage": {
        "input_images": 1,
        "generated_images": 2,
        "output_tokens": 8549,
        "total_tokens": 8549
      }
    }
    ```

    For decomposition, `size` accepts `auto`, `1K`, `1.5K`, or `2K`; explicit pixel sizes are not supported. If any requested layer fails, the whole request fails.
  </Tab>
</Tabs>

## Output controls

| Parameter | Values | Notes |
| - | - | - |
| `size` | `1K`, `1.5K`, `2K`, or explicit pixels | Normal generation defaults to `2K`; layer decomposition also supports `auto` |
| `response_format` | `url`, `b64_json` | URLs are valid for 24 hours; save them promptly |
| `output_format` | `jpeg`, `png` | Defaults to `jpeg`; transparent output and extracted layers use PNG |
| `background` | `opaque`, `transparent` | `transparent` is restricted to the single transparent-input workflow |
| `watermark` | `true`, `false` | Defaults to `true` |
| `optimize_prompt_options.mode` | `standard` | Default. Flash does not support `fast` mode. |

## Size and input limits

For normal generation, explicit dimensions must contain between 921,600 and 4,624,220 total pixels and use an aspect ratio in `[1/16, 16]`. Representative sizes include `1024x1024` for 1K, `1536x1536` for 1.5K, and `2048x2048` for 2K.

Normal reference images support `jpeg`, `png`, `webp`, `bmp`, `tiff`, `gif`, `heic`, and `heif`. Each image must be smaller than 30 MB, have an aspect ratio in `[1/16, 16]`, have width and height greater than 14 px, and contain from 196 through 36,000,000 pixels.

Layer decomposition accepts one PNG or JPEG with 512×512 to 6000×6000 total pixels, with the same aspect-ratio and 30 MB limits.

<Card title="API Reference" icon="code" href="/api-reference/model-api/bytedance/doubao-seedream-5-0-flash-260915">View all Seedream 5.0 Flash workflows.</Card>

## Official references

* [Seedream 5.0 Pro / Flash guide](https://docs.volcengine.com/docs/ark/seedream-5-0-pro?lang=zh)
* [Image generation API](https://docs.volcengine.com/docs/ark/image-generation-api?lang=zh)
* [Seedream model comparison](https://console.volcengine.com/ark/region:cn-beijing/docs/seedream-4-0-5-0)

<script src="/public/feedback.js" />


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.