> ## 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 4.0

> Use ByteDance Seedream 4.0 through AnyFast for text-to-image, image-to-image, and sequential image generation.

Seedream 4.0 is ByteDance's image generation model for text prompts and reference-image workflows. Use model ID `doubao-seedream-4-0-250828`.

## Key capabilities

* **Text to image** — Generate images from text prompts
* **Image to image** — Generate images from one or more references and a text prompt
* **Sequential generation** — Generate multiple related images in one request
* **Output control** — Configure size, seed, watermark, and logo settings

<Tabs>
  <Tab title="Text to image">
    ## Quick example

    <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-4-0-250828",
          "prompt": "A serene mountain landscape at sunrise with misty valleys",
          "size": "1024x1024",
          "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-4-0-250828",
              "prompt": "A serene mountain landscape at sunrise with misty valleys",
              "size": "1024x1024",
              "watermark": False,
          },
      )
      print(response.json())
      ```
    </CodeGroup>

    | Parameter   | Type    | Required | Description                                                      |
    | ----------- | ------- | -------- | ---------------------------------------------------------------- |
    | `model`     | string  | Yes      | Must be `doubao-seedream-4-0-250828`                             |
    | `prompt`    | string  | Yes      | Image generation prompt                                          |
    | `size`      | string  | No       | Output size such as `1024x1024` or `2K`                          |
    | `watermark` | boolean | No       | Whether to add a watermark; default `false`                      |
    | `seed`      | integer | No       | Random seed                                                      |
    | `logo_info` | object  | No       | Logo settings: `add_logo`, `position`, `language`, and `opacity` |
  </Tab>

  <Tab title="Image to image">
    ## Quick example

    <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-4-0-250828",
          "prompt": "A girl and a cow doll riding a roller coaster in the morning, at noon, and at night",
          "image": ["https://example.com/ref1.png", "https://example.com/ref2.png"],
          "sequential_image_generation": "auto",
          "sequential_image_generation_options": {"max_images": 3},
          "size": "2K",
          "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-4-0-250828",
              "prompt": "A girl and a cow doll riding a roller coaster in the morning, at noon, and at night",
              "image": ["https://example.com/ref1.png", "https://example.com/ref2.png"],
              "sequential_image_generation": "auto",
              "sequential_image_generation_options": {"max_images": 3},
              "size": "2K",
              "watermark": False,
          },
      )
      print(response.json())
      ```
    </CodeGroup>

    | Parameter                                        | Type      | Required | Description                                                      |
    | ------------------------------------------------ | --------- | -------- | ---------------------------------------------------------------- |
    | `model`                                          | string    | Yes      | Must be `doubao-seedream-4-0-250828`                             |
    | `prompt`                                         | string    | Yes      | Image generation or editing prompt                               |
    | `image`                                          | string\[] | Yes      | Reference image URLs                                             |
    | `sequential_image_generation`                    | string    | No       | Set to `auto` to generate an image batch                         |
    | `sequential_image_generation_options.max_images` | integer   | No       | Maximum number of generated images                               |
    | `size`                                           | string    | No       | Output size such as `1024x1024` or `2K`                          |
    | `watermark`                                      | boolean   | No       | Whether to add a watermark; default `false`                      |
    | `seed`                                           | integer   | No       | Random seed                                                      |
    | `logo_info`                                      | object    | No       | Logo settings: `add_logo`, `position`, `language`, and `opacity` |
  </Tab>
</Tabs>

<Card title="API Reference" icon="code" href="/api-reference/model-api/bytedance/doubao-seedream-4-0-250828">View both Seedream 4.0 workflows.</Card>

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