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

# Seedream Seedream

> Use DeerAPI to call the Seedream Seedream endpoint with request details, response details, examples, and an OpenAPI playground.

## Overview

Use this endpoint to call the Seedream Seedream workflow through DeerAPI. The API reference on this page shows the request schema, response schema, authentication requirements, and runnable examples for the configured endpoint.

## Before you start

Use the DeerAPI base URL and pass your API Key in the `Authorization` header:

```text theme={null}
https://api.deerapi.com
```

```text theme={null}
Authorization: Bearer $DEERAPI_KEY
```

## Model selection

Choose a current model ID from the [live pricing page](https://api.deerapi.com/pricing). Model availability changes over time, so avoid copying a model ID from an old project without checking the live list first.

## Implementation notes

* Use the OpenAPI playground for the exact request fields accepted by this endpoint.
* Keep API Keys on the server side when you build production applications.
* Log the request ID from failed calls so support can investigate the request.
* Retry `429`, `500`, and `503` responses with exponential backoff.


## OpenAPI

````yaml /api/openapi/image/doubao/post-seedream.openapi.json POST /v1/images/generations
openapi: 3.1.0
info:
  title: bytedance-image-generation(seedream) API
  version: 1.0.0
servers:
  - url: https://api.deerapi.com
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      summary: bytedance-image-generation(seedream)
      operationId: bytedance_image_generation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: >-
                Parameters for Seedream image generation (text-to-image and
                image-to-image).
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  description: >-
                    Model to use. See the [Models
                    page](https://api.deerapi.com/pricing) for current Seedream
                    model IDs.
                  default: doubao-seedream-5-0-260128
                prompt:
                  type: string
                  description: >-
                    Text prompt describing the image to generate. Use a clear
                    English prompt; recommended max 1000 characters.
                  default: a cat wearing a scarf sitting by the window
                response_format:
                  type: string
                  description: >-
                    Output format. `url` returns a temporary image link (valid
                    for 24 hours); `b64_json` returns base64-encoded image data.
                  default: url
                  enum:
                    - url
                    - b64_json
                size:
                  type: string
                  description: >-
                    Output resolution. Presets `2K`, `4K`, or exact pixels like
                    `2048x2048`, `2304x1728`, `2848x1600`, `1600x2848`, etc.
                    Default: `2048x2048`.
                  default: 2048x2048
                image:
                  type: array
                  items:
                    type: string
                  description: >-
                    Reference image(s) for image-to-image generation. Each item
                    is a public URL or base64 data URI
                    (`data:image/png;base64,...`). Supports up to 14 reference
                    images. Supported formats: jpeg, png, webp, bmp, tiff, gif.
                watermark:
                  type: boolean
                  description: >-
                    When `true`, adds an 'AI Generated' watermark to the
                    bottom-right corner of the output image.
                  default: true
                guidance_scale:
                  type: number
                  description: >-
                    Controls how closely the output follows the prompt. Higher
                    values increase adherence but may reduce naturalness. Range:
                    1.0–10.0. Not supported by Seedream 5.0 (ignored).
                  default: 2.5
                seed:
                  type: integer
                  description: >-
                    Random seed for reproducible outputs. Range: -1 to
                    2147483647. Use -1 (default) for random generation. Legacy
                    parameter — ignored by newer models.
                  default: -1
                sequential_image_generation:
                  type: string
                  description: >-
                    Controls sequential (multi-image) generation mode.

                    - `auto`: model decides whether to generate a sequence based
                    on the prompt

                    - `disabled`: always generate a single image
                  default: disabled
                  enum:
                    - auto
                    - disabled
                sequential_image_generation_options:
                  type: object
                  description: >-
                    Configuration for sequential (multi-image) generation. Only
                    effective when `sequential_image_generation` is `auto`.
                  properties:
                    max_images:
                      type: integer
                      description: >-
                        Maximum number of images to generate in this request.
                        Range: [1, 15]. Total reference images + generated
                        images must be ≤ 15.
                      default: 15
                output_format:
                  type: string
                  description: 'Output image file format. Options: `png`, `jpeg`.'
                  default: jpeg
                  enum:
                    - png
                    - jpeg
              default:
                model: doubao-seedream-5-0-260128
                prompt: a cat wearing a scarf sitting by the window
                response_format: url
                size: 2K
                watermark: false
            examples:
              Seedream 5.0 — Text to Image:
                summary: Seedream 5.0 — Text to Image
                value:
                  model: doubao-seedream-5-0-260128
                  prompt: >-
                    a cat wearing a scarf sitting by the window watching rain,
                    illustration style
                  size: 2K
                  response_format: url
                  watermark: false
              Seedream 5.0 — Image to Image:
                summary: Seedream 5.0 — Image to Image (single ref)
                value:
                  model: doubao-seedream-5-0-260128
                  prompt: transform into watercolor painting style, vibrant colors
                  image:
                    - https://example.com/photo.jpg
                  size: 2K
                  response_format: url
                  watermark: false
              Seedream 5.0 — Sequential (Multi-Image):
                summary: Seedream 5.0 — Sequential multi-image generation
                value:
                  model: doubao-seedream-5-0-260128
                  prompt: >-
                    a 4-panel comic strip of a cat's daily routine: waking up,
                    eating breakfast, playing, and sleeping
                  size: 2K
                  response_format: url
                  sequential_image_generation: auto
                  sequential_image_generation_options:
                    max_images: 4
                  watermark: false
              Seedream 4.5 — Text to Image:
                summary: Seedream 4.5 — Text to Image
                value:
                  model: doubao-seedream-4-5-251128
                  prompt: a futuristic cityscape at sunset with flying cars
                  size: 2K
                  response_format: url
                  watermark: false
              Seedream 4.0 — Text to Image:
                summary: Seedream 4.0 — Text to Image
                value:
                  model: doubao-seedream-4-0-250828
                  prompt: an oil painting of a mountain lake at dawn
                  size: 2K
                  response_format: url
                  watermark: false
            example:
              model: doubao-seedream-5-0-260128
              prompt: >-
                a cat wearing a scarf sitting by the window watching rain,
                illustration style
              size: 2K
              response_format: url
              watermark: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - created
                  - data
                  - usage
                properties:
                  model:
                    type: string
                    description: The model used for generation.
                  created:
                    type: integer
                    description: Unix timestamp (seconds) when the image was generated.
                  data:
                    type: array
                    description: Array of generated image objects.
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: >-
                            Signed download URL for the generated image (valid
                            for 24 hours). Returned when `response_format` is
                            `url`.
                        b64_json:
                          type: string
                          description: >-
                            Base64-encoded image data. Returned when
                            `response_format` is `b64_json`.
                        size:
                          type: string
                          description: >-
                            Pixel dimensions of the generated image, e.g.
                            `2048x2048`. Returned by some models.
                  usage:
                    type: object
                    description: Resource usage information for this request.
                    properties:
                      generated_images:
                        type: integer
                        description: Number of images successfully generated.
                      output_tokens:
                        type: integer
                        description: >-
                          Tokens consumed by the generated image(s). Calculated
                          as sum(width × height) / 256.
                      total_tokens:
                        type: integer
                        description: >-
                          Total tokens consumed (currently equals
                          output_tokens).
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |
            curl https://api.deerapi.com/v1/images/generations \
              -H "Content-Type: application/json" \
              -H "Authorization: Bearer $DEERAPI_KEY" \
              -d '{
                "model": "doubao-seedream-5-0-260128",
                "prompt": "a cat wearing a scarf sitting by the window watching rain, illustration style",
                "size": "2K",
                "response_format": "url",
                "watermark": false
              }'
        - lang: Python
          label: requests
          source: |
            import os
            import requests

            url = "https://api.deerapi.com/v1/images/generations"
            headers = {
                "Authorization": "Bearer " + os.environ["DEERAPI_KEY"],
                "Content-Type": "application/json",
            }
            payload = {
              "model": "doubao-seedream-5-0-260128",
              "prompt": "a cat wearing a scarf sitting by the window watching rain, illustration style",
              "size": "2K",
              "response_format": "url",
              "watermark": false
            }

            response = requests.post(url, headers=headers, json=payload)
            print(response.json())
        - lang: JavaScript
          label: fetch
          source: >
            const response = await
            fetch("https://api.deerapi.com/v1/images/generations", {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.DEERAPI_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "model": "doubao-seedream-5-0-260128",
                "prompt": "a cat wearing a scarf sitting by the window watching rain, illustration style",
                "size": "2K",
                "response_format": "url",
                "watermark": false
              }),
            });


            console.log(await response.json());
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use a DeerAPI API Key as a Bearer token.

````