altrouter.ai
Models/ByteDance/Seedream V4
SD

ByteDance: Seedream V4

Imageseedream-v4

ByteDance Seedream V4: photoreal generation and editing.

API docs
Playgroundseedream-v4
Reference image
Size
Resolution
Seed
Latency3.4 s
24hnow
Specifications
Authorbytedance
ModalityImage
Price$0.030 / image$0.035 / image
Savings15%
Quick start
from openai import OpenAI

client = OpenAI(
    base_url="https://api.altrouter.ai/v1",
    api_key="ar-...",
)

img = client.images.generate(
    model="seedream-v4",
    prompt="a red fox in the snow",
)
print(img.data[0].url)

Same OpenAI-compatible endpoint — just swap base_url and key.

API

OpenAI-compatible image generation endpoint. The result is re-hosted on our CDN and returned as a URL.

POST/v1/images/generations
Body parameters
modelstringrequired"seedream-v4"
The model id.
promptstringrequired
The text description of the image.
imagestringURL or base64
Reference images for editing.
image_sizeenumsquare_hd · square · portrait_4_3 · portrait_3_2 · portrait_16_9 · landscape_4_3 · landscape_3_2 · landscape_16_9 · landscape_21_9default square_hd
Image size / orientation preset.
resolutionenum1K · 2K · 4Kdefault 1K
Resolution tier (affects price).
seednumber0–2147483647
Seed for reproducibility.
Response
createdinteger
Unix creation time (seconds).
dataarray
Images. Each: url (our CDN), b64_json, revised_prompt.
Example
cURLPythonJSON
curl https://api.altrouter.ai/v1/images/generations \
  -H "Authorization: Bearer ar-..." \
  -H "Content-Type: application/json" \
  -d '{
  "model": "seedream-v4",
  "prompt": "a red fox in the snow",
  "image_size": "square_hd",
  "resolution": "1K"
}'
Errors
400Invalid request.
401Missing or invalid API key.
402Insufficient credits, or the key’s spending cap is exhausted.
404Model not found.
429Rate limit exceeded.
More from ByteDance
Seedream 4.5
seedream-4.5
Seedream 5 Lite
seedream-5-lite
Seedream 5 Pro
seedream-5-pro
Seedance 2.0
seedance-2.0