Seedream 4.0 API
Seedream 4.0 API reference: generate and edit images at 1K, 2K or 4K with up to 10 reference images, for one flat price. Request fields, pricing and examples.
- Model id
seedream-4- Price
- 6 credits / image
- Output
- 1K–4K
- Reference images
- Up to 10
Aspect ratios
/api/v1/generations6 credits per image at every quality setting. Reference images do not add an extra charge. Check credits_refunded to confirm a refund; unresolved submissions may require review.
Authorization
AuthorizationstringrequiredBearer fx1_live_… — send your API key in the request header. Requires a completed paid purchase; new generations also require enough credits.
Idempotency-KeystringoptionalUse one unique value per generation and reuse it with the same body on retries. Printable ASCII, no spaces. A different body with the same key returns 409.
Maximum length: 128 characters
Request body
modelstringrequiredUse this exact model ID in the top-level request body.
seedream-4promptstringrequiredDescribe the image to create or the changes to apply. Whitespace is trimmed; the result must not be empty.
Maximum length: 3,000 characters
imagesstring[]optionalPublicly accessible HTTPS image URLs, up to 2,048 characters each. Omit or pass [] for text-to-image; supply 1–10 references for image editing. Base64 is not accepted.
Maximum items: 10
aspect_ratiostringoptionalOutput width-to-height ratio, for edits too: the output does not follow the reference's shape on its own. Custom dimensions and auto are not supported.
Default: 1:1
1:14:33:416:99:162:33:221:9resolutionstringoptionalOutput tier, case-insensitive. Every tier costs the same.
Default: 2K
1K2K4KResponse & next step
A successful submission returns 202 and a generation id. Poll GET /api/v1/generations/{id} every 2–3 seconds until the status is succeeded or failed.
Read the result URL from output.images[0].url. Download it before expires_at (30 days after storage). On failure, inspect error and credits_refunded.
Model notes
seedream-4is Seedream 4.0 from ByteDance Seed, released in September 2025. It was the first Seedream to handle generation and editing in one model. Seedream 4.5 (seedream-4-5) is its upgrade and takes up to 14 references.- Choose output size with
resolution:1K,2K(default) or4K, case-insensitive. Every tier costs the same. - Reference images are free: a request with 10 references costs the same as text-to-image. Omitting
images, or using an empty array, creates a text-to-image task; 1–10 HTTPS references create an editing task. - Pick
aspect_ratiofor edits too. The output does not follow the reference's shape on its own. - Send
prompt,images,aspect_ratioandresolutionalongsidemodel. Unknown fields are rejected, includingquality,seed,n, custom dimensions andwebhook_url. Base64 input is not accepted by this model. - Content safety checking is enabled. One image is generated per request; the multi-image sets the model can draw in one call are not offered here.
- The final image is saved to Flux storage before the generation is marked successful. A temporary status-query or storage error keeps the task queued for another attempt.
Seedream 4.0 API FAQ
How much does the Seedream 4.0 API cost?
6 credits per image. Reference images do not add an extra charge. Credits are taken when the submission starts and refunded automatically if the provider rejects it or the generation fails. The API spends the same balance as the web app; see Credits.
How do I get a Seedream 4.0 API key?
Any account with a completed paid credit-pack or subscription purchase can create keys under Settings → API Keys. Send the key as Authorization: Bearer <key> and set "model": "seedream-4". The same key works for every model in this API.
Is there a free Seedream 4.0 API?
No. Free or gifted credits alone do not unlock API keys, and every request spends credits. To try the model before paying, use the Seedream 4.0 web generator.
Can I call the Seedream 4.0 API from Python?
Yes. It is a plain HTTPS and JSON API, so no SDK is needed. The request builder above shows this call in cURL, Node.js and Python, and the Quick start has a complete Python script that submits a generation and polls it until it finishes.
Is Seedream 4.0 open source? Is it on Hugging Face?
No. ByteDance offers Seedream 4.0 as a hosted model and has not published its weights, so there is no official Hugging Face or GitHub download. You use it through an API such as this one.
Is there a Seedream 5.0 API?
Yes. Seedream 5.0 is offered as three separate models: Seedream 5.0 Lite (seedream-5, up to 4K), Seedream 5.0 Pro and Seedream 5.0 Flash. The newest model, Seedream 5.5, is available too, and Seedream 4.5 is the direct upgrade to 4.0.
Seedream 4.5
Seedream 4.5 API reference: generate and edit images at 2K or 4K with up to 14 reference images, for one flat price. Request fields, pricing and code examples.
MiniMax H3 Image
MiniMax H3 Image API reference: generate and edit at 1K, 2K or native 4K with up to 16 reference images, with a literal prompt mode. Pricing and code examples.