# Seedream-5-0-flash API

> Seedream image generation and layer decomposition

- Model ID: `dola-seedream-5-0-flash-260915`
- Provider: BytePlus
- Tasks: Image to Image, Layer Decomposition, Text to Image
- Price: Provider cost USD 0.018 / output image; input images free
- Web page: https://scalingtensor.com/models/dola-seedream-5-0-flash-260915

## How to call it

Authenticate with the `apiKey` request header. Submit a job, then poll for the result:

1. `POST https://restapi.scalingtensor.com/api/media/generate` with JSON `{ "model": "<model ID>", "params": { ... } }`. The response `data.jobId` identifies the job.
2. `GET https://restapi.scalingtensor.com/api/media/result?jobId=<jobId>` until the status is `completed` or `failed`.
3. A response `code` of 0 means success; otherwise read `msg`.

```bash
curl --request POST 'https://restapi.scalingtensor.com/api/media/generate' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "model": "dola-seedream-5-0-flash-260915",
  "params": {
    "size": "2K",
    "prompt": "A small cat in a sunlit garden, watercolor illustration.",
    "watermark": false,
    "response_format": "url"
  }
}'
```

## Input parameters

Parameters go inside the `params` object.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `prompt` | string | conditional | Generation or editing instructions; no more than 300 Chinese characters or 600 English words is recommended. Required for generation; optional for layer decomposition. Place parameters in params and use the slug from the model table for the top-level model field. |
| `image` | string \| string[] | conditional | A public URL or data:image/...;base64,...; up to 10 reference images, each no larger than 30MB, with a total pixel count of 196-36000000 and an aspect ratio of 1/16-16. Required for layer decomposition, which accepts exactly one PNG/JPEG image of at least 512x512 pixels. |
| `layer_decomposition` | boolean | false | Defaults to false; true decomposes the image into a base image and up to 16 layers. If any layer fails, the entire request fails. |
| `size` | string | false | Defaults to 2K for generation; supports 1K, 1.5K, 2K, or WIDTHxHEIGHT. Custom dimensions must have a total pixel count of 921600-4624220 and an aspect ratio of 1/16-16. Defaults to auto for decomposition; supports auto, 1K, 1.5K, and 2K. |
| `optimize_prompt_options` | object | false | Prompt optimization settings. |
| `optimize_prompt_options.mode` | string | false | Defaults to standard; only standard is supported. |
| `output_format` | string | false | Defaults to jpeg; supports png and jpeg. For decomposition, this controls only the base image; layers are always PNG. |
| `background` | string | false | Defaults to opaque; supports opaque and transparent. Transparent mode accepts only a single input image with an existing alpha channel; generating transparent images from text-only input is not supported. This field is not supported for decomposition; transparent cannot be used with jpeg. |
| `response_format` | string | false | Defaults to url; supports url and b64_json. Image URLs are valid for 24 hours. |
| `watermark` | boolean | false | Defaults to true; specifies whether to add an image watermark. |
| `safety_identifier` | string | false | A unique end-user identifier; using a hash of the user identifier is recommended. |

## FAQ

### How much does the Seedream-5-0-flash API cost?

Seedream-5-0-flash is billed at the provider's actual cost for each job (USD 0.018 / output image; input images free). The charge is deducted from your prepaid ScalingTensor wallet.

### How do I call the Seedream-5-0-flash API?

Send POST /api/media/generate with "model": "dola-seedream-5-0-flash-260915" and the parameters in a params object, using your apiKey header. The call returns a jobId. Poll GET /api/media/result?jobId=... until the status is completed, then read the output URL from the result.

### Which parameters does Seedream-5-0-flash accept?

No parameter is strictly required. Optional: prompt, image, layer_decomposition, size, optimize_prompt_options, output_format, background, response_format, watermark and safety_identifier. The parameter table on this page describes each one.

### Do I need a BytePlus account to use Seedream-5-0-flash?

No. You call Seedream-5-0-flash with your ScalingTensor API key and pay from your ScalingTensor wallet. The same key works for every other model in the catalog.
