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

# Doubao-Seedream-4.0

Seedream 4.0 natively accepts text, a single image, or multiple images. It can blend references while keeping subjects consistent, edit images, and generate related image sets. This guide shows how to use the API to generate sets and create images from multiple references.

### Model parameters

* Model ID: `doubao-seedream-4.0`
* Pricing: Check the [Model Hub](https://geekai.co/models?platform=bytedance\&type=image) for current prices.
* Endpoint: `https://geekai.co/api/v1/images/generations`
* Parameters: See the [Image API reference](https://docs.geekai.co/en/api/image/generations.md).
* Authentication: [Get an API key](https://docs.geekai.co/en/docs/quick_start.md).

> [!NOTE]
>
> The following Image API parameters are not supported:
>
> * `negative_prompt`
> * `seed`
> * `strength`
> * `aspect_ratio`
> * `quality`
> * `style_preset`
> * `output_format`
> * `mask`
> * `background`
>
> See also: [Official Seedream 4.0 API documentation](https://www.volcengine.com/docs/82379/1824121).

Doubao-Seedream-4.0 does not have separate aspect ratio and resolution settings. Use `size` in one of two ways:

* Specify a resolution (`1K`, `2K`, or `4K`), then describe the desired aspect ratio in `prompt`.
* Specify width and height in pixels. The default is `2048x2048` (1:1). Use the following dimensions for other aspect ratios:

| Aspect ratio | Pixel dimensions |
| - | - |
| 1:1 | 2048x2048 |
| 4:3 | 2304x1728 |
| 3:4 | 1728x2304 |
| 16:9 | 2560x1440 |
| 9:16 | 1440x2560 |
| 3:2 | 2496x1664 |
| 2:3 | 1664x2496 |
| 21:9 | 3024x1296 |

The allowed range for width × height in pixels is `[1280x720, 4096x4096]`.

### Text-to-image generation

Generate an image from a text description:

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"doubao-seedream-4.0",
    "prompt":"Draw a cute kitten playing in the grass",
    "size": "1K"
}'
```

The response is a JSON object containing the URL of the generated image:

```json theme={null}
{
    "model": "doubao-seedream-4.0",
    "created": 1760442379,
    "task_id": "42bcdbe2-fde8-4bf5-8ec0-8743ba2a604d",
    "task_status": "succeed",
    "data": [
        {
            "url": "https://static.geekai.co/image/2025/10/14/d06edffeb278fdb80026af1dc8725f66.jpeg"
        }
    ],
    "usage": {
        "billed_units": 1,
        "output_tokens": 3888,
        "total_tokens": 3888
    }
}
```

### Image-to-image generation

**Single image**

Edit an existing image using a text instruction to generate a new image:

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"doubao-seedream-4.0",
    "prompt": "Generate a close-up of the dog lying on the grass",
    "image": "https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_imageToimage.png",
    "size": "2K"
}'
```

As with text-to-image generation, the response is a JSON object containing the generated image URL:

```json theme={null}
{
    "model": "doubao-seedream-4.0",
    "created": 1760442250,
    "task_id": "577f046f-d45b-432e-b3b5-bcff4c546f43",
    "task_status": "succeed",
    "data": [
        {
            "url": "https://static.geekai.co/image/2025/10/14/d61920ceeaf3a5428d5257477c2bc444.jpeg"
        }
    ],
    "usage": {
        "billed_units": 1,
        "output_tokens": 4096,
        "total_tokens": 4096
    }
}
```

**Multiple images**

Combine styles or elements from several reference images. For example, combine clothes, shoes, and accessories with a model photo to show an outfit, or place a person in a landscape:

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"doubao-seedream-4.0",
    "prompt": "Replace the clothing in image 1 with the clothing from image 2",
    "image": [
        "https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_imagesToimage_1.png", 
        "https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_imagesToimage_2.png"
    ],
    "size": "2K"
}'
```

As with a single input, the response is a JSON object containing the generated image URL:

### Generate image sets

Use text and one or more images to generate related images, such as comic panels or a brand identity set:

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"doubao-seedream-4.0",
    "prompt": "Create four connected illustrations of the same corner of a courtyard through the four seasons. Use a consistent style to show the distinctive colors, elements, and atmosphere of each season.",
    "size": "2K",
    "response_format": "url",
    "watermark": true,
    "extra_body": {
        "sequential_image_generation": "auto",
        "sequential_image_generation_options": {
            "max_images": 4
        }
    }
}'
```

The response is a JSON object containing the list of generated images:

```json theme={null}
{
    "model": "doubao-seedream-4.0",
    "created": 1760442607,
    "task_id": "3327c84d-e138-4874-be2c-143134d075cc",
    "task_status": "succeed",
    "data": [
        {
            "url": "https://static.geekai.co/image/2025/10/14/5a30bd378a89eb177cba13041c534636.jpeg"
        },
        {
            "url": "https://static.geekai.co/image/2025/10/14/5c5416fb79cbdf76e80bc88fb3693c19.jpeg"
        },
        {
            "url": "https://static.geekai.co/image/2025/10/14/52fa648446cec78dab5f671cb650527d.jpeg"
        },
        {
            "url": "https://static.geekai.co/image/2025/10/14/da412a64d2a300896e2508d7c4b18fc2.jpeg"
        }
    ],
    "usage": {
        "billed_units": 4,
        "output_tokens": 62208,
        "total_tokens": 62208
    }
}
```


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