Seedream API Documentation
Buy credits, generate a key, and call Seedream through a simple endpoint. If you've used the OpenAI API before, you already know this one.
seedreamapi.io is an independent proxy and reseller for Seedream. Endpoints below point at our proxy; responses originate from Seedream models.
Introduction
The Seedream API exposes a REST interface modeled on the OpenAI specification. You authenticate with a bearer token and receive standard JSON responses, so the official OpenAI SDKs and most HTTP clients work with minimal changes.
Base URL
Authentication
The API uses bearer token authentication. Create a key from your dashboard after topping up credits, then pass it on every request:
# HTTP headers
Authorization: Bearer sk-seedream-your-key
Content-Type: application/jsonKeep keys secret. Treat API keys like passwords — never embed them in client-side code or commit them to a repository. Rotate or revoke a leaked key instantly from your dashboard.
Quickstart
Python
from openai import OpenAI
client = OpenAI(api_key="sk-seedream-your-key", base_url="https://api.seedreamapi.io/v1")
img = client.images.generate(
model="seedream-4-0",
prompt="a red panda coding at night, cinematic lighting",
size="1024x1024",
n=1,
)
print(img.data[0].url)cURL
curl https://api.seedreamapi.io/v1/images/generations \
-H "Authorization: Bearer sk-seedream-your-key" \
-H "Content-Type: application/json" \
-d '{"model": "seedream-4-0", "prompt": "a serene mountain lake", "size": "1024x1024"}'Generate images
Generates one or more images from a text prompt. Returns an OpenAI-style response with hosted URLs.
{ "created": 1716400000, "data": [ { "url": "https://cdn.seedreamapi.io/img/abc.png" } ] }Parameters
model—seedream-4-0orseedream-3-0. Required.prompt— text description of the image. Required.size— e.g.1024x1024,1536x1024.n— number of images.response_format—urlorb64_json.
Models
| Model ID | Name |
|---|---|
| seedream-4-0 | Seedream 4.0 |
| seedream-3-0 | Seedream 3.0 |
Errors
Conventional HTTP status codes are used, with an OpenAI-style error body: { "error": { "message", "type", "code" } }.
| Code | Meaning |
|---|---|
| 400 | Malformed request |
| 401 | Invalid or missing API key |
| 402 | Insufficient credits — top up your balance |
| 429 | Rate limit exceeded |
| 500 / 503 | Upstream or proxy error — retry with backoff |
Rate limits
Rate limits scale with your plan and balance. When you exceed a limit you'll receive a 429 with a Retry-After header — back off and retry. Need a custom limit? Contact us.
Ready to build? Get your API key and make your first call in minutes.