# Doubao Seedream 4.0 Model id on AIHubMix: `doubao-seedream-4-0` Create an API key: https://console.aihubmix.com/ > Seedream 4.0 is a SOTA-level multimodal image creation model based on leading architecture. It breaks the creative boundaries of traditional text-to-image models by natively supporting text, single image, and multiple image inputs. Users can freely combine text and images to achieve various creative styles within the same model, such as multi-image fusion creation based on subject consistency, image editing, and set image generation, making image creation more flexible and controllable. Seedream 4.0 supports composite editing with up to 10 images in a single input. Through deep reasoning of prompt words, it automatically adapts the optimal image aspect ratio and generation quantity, enabling continuous output of up to 15 content-related images at one time. Additionally, the model significantly improves the accuracy and content diversity of Chinese generation, supports 4K ultra-high-definition output, and provides a one-stop solution from generation to editing for professional image creation. - Developer: Doubao - Input modalities: text, image - Pricing: per-generation — see https://aihubmix.com/model/doubao-seedream-4-0 ## Endpoints (base URL: https://aihubmix.com) - `POST /ai/v1/images/generations` — image generation (`Authorization: Bearer $AIHUBMIX_API_KEY`) - `POST /v1/images/edits` — image generation (`Authorization: Bearer $AIHUBMIX_API_KEY`) - `POST /v1/images/generations` — image generation (`Authorization: Bearer $AIHUBMIX_API_KEY`) ## Example ```bash curl -s https://aihubmix.com/ai/v1/images/generations \ -H "Authorization: Bearer $AIHUBMIX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"doubao-seedream-4-0","prompt":""}' ``` The response carries the output URL(s) directly. Full parameter list: see the schema link below. Generation costs real money — check the price on the model page first. ## Parameters (image endpoint) | name | type | required | default | enum | |---|---|---|---|---| | `aspect_ratio` | string,null | no | | 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, … | | `async` | boolean | no | false | | | `extra` | object,null | no | | | | `image` | - | no | | | | `images` | array,null | no | | | | `model` | string | yes | | | | `n` | integer,null | no | 1 | | | `prompt` | string | yes | | | | `response_format` | string,null | no | "url" | url, b64_json, null | | `seed` | integer,null | no | | | | `size` | string,null | no | | | | `webhook_events_filter` | array | no | | | | `webhook_url` | string | no | | | Always-current parameter schema (authoritative, no auth): ```bash curl -s https://aihubmix.com/call/schema/models/doubao-seedream-4-0/endpoints ``` Output URLs are short-lived (roughly 30 minutes) and are downloaded with the same `Authorization: Bearer` header — fetch them promptly and store the content yourself. ## Errors Error responses carry a `tid` (trace id) — include it when contacting support. Reference: https://docs.aihubmix.com/en/FAQs/HTTP-Codes.md - 400 — parameter error; most are passed through from the upstream provider (media: `prompt_missing`, `size_not_supported`, `n_not_within_range`, …) - 401 — missing `Authorization` header, or the key is invalid/expired - 403 — `insufficient_user_quota` (top up at https://console.aihubmix.com/), account suspended, or this key is not allowed to use this model - 429 — rate limited; back off and retry - 503 — no channel can serve the request (check the model id and your access), or the upstream provider is throttling; retry later ## More - Machine-readable endpoint schema (no auth): https://aihubmix.com/call/schema/models/doubao-seedream-4-0/endpoints - Async task guide: https://docs.aihubmix.com/en/api/async-tasks.md - Model page: https://aihubmix.com/model/doubao-seedream-4-0 - Try in browser: https://playground.aihubmix.com/?model=doubao-seedream-4-0 - Compare with another model (human-facing, side-by-side specs and pricing): https://aihubmix.com/compare/doubao-seedream-4-0/{other_model_id} - Generate runnable code programmatically: npm `@aihubmix/codegen` — the generator behind the Playground's "Get Code" (4 protocols × 7 languages, media endpoints included); the body it builds is the exact wire body the Playground sends, so generated snippets and real requests cannot diverge. `@aihubmix/model-schema` (npm) translates the parameter schema above into codegen input - Site index for agents: https://aihubmix.com/llms.txt · Onboarding: https://aihubmix.com/agents.md --- Canonical version of this document: https://aihubmix.com/model/doubao-seedream-4-0/llms.txt