Skip to main content
POST
/
v1
/
images
/
generations
cURL
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
  }'
{
  "created": 123,
  "data": [
    {
      "url": "<string>",
      "b64_json": "<string>",
      "size": "<string>"
    }
  ],
  "usage": {
    "generated_images": 123,
    "output_tokens": 123,
    "total_tokens": 123
  },
  "model": "<string>"
}

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:
https://api.deerapi.com
Authorization: Bearer $DEERAPI_KEY

Model selection

Choose a current model ID from the live pricing page. 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.

Authorizations

Authorization
string
header
required

Use a DeerAPI API Key as a Bearer token.

Body

application/json

Parameters for Seedream image generation (text-to-image and image-to-image).

model
string
default:doubao-seedream-5-0-260128
required

Model to use. See the Models page for current Seedream model IDs.

prompt
string
default:a cat wearing a scarf sitting by the window
required

Text prompt describing the image to generate. Use a clear English prompt; recommended max 1000 characters.

response_format
enum<string>
default:url

Output format. url returns a temporary image link (valid for 24 hours); b64_json returns base64-encoded image data.

Available options:
url,
b64_json
size
string
default:2048x2048

Output resolution. Presets 2K, 4K, or exact pixels like 2048x2048, 2304x1728, 2848x1600, 1600x2848, etc. Default: 2048x2048.

image
string[]

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
boolean
default:true

When true, adds an 'AI Generated' watermark to the bottom-right corner of the output image.

guidance_scale
number
default:2.5

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).

seed
integer
default:-1

Random seed for reproducible outputs. Range: -1 to 2147483647. Use -1 (default) for random generation. Legacy parameter — ignored by newer models.

sequential_image_generation
enum<string>
default:disabled

Controls sequential (multi-image) generation mode.

  • auto: model decides whether to generate a sequence based on the prompt
  • disabled: always generate a single image
Available options:
auto,
disabled
sequential_image_generation_options
object

Configuration for sequential (multi-image) generation. Only effective when sequential_image_generation is auto.

output_format
enum<string>
default:jpeg

Output image file format. Options: png, jpeg.

Available options:
png,
jpeg

Response

200 - application/json

Successful Response

created
integer
required

Unix timestamp (seconds) when the image was generated.

data
object[]
required

Array of generated image objects.

usage
object
required

Resource usage information for this request.

model
string

The model used for generation.