Seedream 4.5
bytedance/seedream-4-5 — a image model by ByteDance. Call it through the gateway’s standard OpenAI-compatible door using the catalog slug; the full parameter schema is reproduced in full below.
| Catalog slug | bytedance/seedream-4-5 |
| Kind | image |
| Vendor | ByteDance |
How to call
Section titled “How to call”Through the Sociaro SDK / OpenAI-compatible door
Section titled “Through the Sociaro SDK / OpenAI-compatible door”from sociaro_ai import Sociaro
client = Sociaro(api_key="gw_live_...")
img = client.images.generate( model="bytedance/seedream-4-5", prompt="a red fox in the snow", # size / n / negative_prompt / seed … — see the schema below)Raw door: POST https://api.sociaro.com/v1/images/generations with {"model": "bytedance/seedream-4-5", "prompt": "…"}. See media doors.
Parameters — full schema
Section titled “Parameters — full schema”The complete, one-to-one API schema for this model, transcribed from the official source. Nothing omitted. Examples in the schema may use a representative model of the family — for this model use the slug bytedance/seedream-4-5 as shown in How to call above.
Coverage map (per-model capability surface)
Section titled “Coverage map (per-model capability surface)”| Model (catalog slug) | In request/response reference | In per-model examples | Supports streaming |
|---|---|---|---|
seedream-5-0 (non-lite) | NOT named in any per-parameter “supported on” clause | YES — every Seedream-5.0 example uses the 5.0 slug | YES |
seedream-5-0-lite | YES — primary “new” model in the “seedream-5-0-lite, 4-5 and 4-0” clauses | YES — lite is the headline 5.0 model | YES |
seedream-4-5 | YES | referenced in image-to-image examples | YES |
seedream-4-0 | YES | YES — used in a 4-0 example | YES |
seedream-3-0-t2i | YES (size/seed/guidance_scale clauses) | no example | not supported (no streaming) |
seededit-3-0-i2i | YES (size adaptive/seed/guidance_scale clauses) | no example | not supported (no streaming) |
seededit-3-0-t2i | YES (image/output_format clauses) | no example | not supported (no streaming) |
The four primary models for this family —
seedream-5-0,seedream-5-0-lite,seedream-4-5,seedream-4-0— share ONE request/response schema on the standard image-generations door. The 3-0/seededit models use the same schema with a reduced capability set; they are included here in full for completeness because their per-parameter behavior is what defines the “supported on” exclusions for the 4.x/5.x models.
Critical per-model differences (one-to-one with the model API)
Section titled “Critical per-model differences (one-to-one with the model API)”| Aspect | seedream-5-0 (non-lite) | seedream-5-0-lite | seedream-4-5 | seedream-4-0 | seedream-3-0-t2i | seededit-3-0-i2i | seededit-3-0-t2i |
|---|---|---|---|---|---|---|---|
image (reference/edit input) | yes (single + multi 2–14) | yes (single + multi 2–14) | yes (single + multi 2–14) | yes (single + multi 2–14) | n/a (t2i) | yes, single only | NOT supported |
size presets | 2K/3K/4K (same shape as lite) | 2K / 3K / 4K | 2K / 4K | 1K / 2K / 4K | pixels only, default 1024x1024 | only adaptive | (size column shown for seededit-3-0-t2i but pixel/preset menu not separately enumerated — treat same pixel rules as the t2i group) |
size pixel-method range (Method 2) | same as lite/4-5 | [2560x1440 = 3,686,400 , 4096x4096 = 16,777,216], ratio [1/16,16] | [3,686,400 , 16,777,216], ratio [1/16,16] | [1280x720 = 921,600 , 16,777,216], ratio [1/16,16] | total px [512x512 , 2048x2048], default 1024x1024 | adaptive (53-row lookup) | — |
seed | NOT supported | NOT supported | NOT supported | NOT supported | supported (default -1) | supported (default -1) | not in clause |
guidance_scale | NOT supported | NOT supported | NOT supported | NOT supported | supported, default 2.5 | supported, default 5.5 | not in clause |
sequential_image_generation (+ _options.max_images) | yes | yes | yes | yes | no | no | no |
stream | yes | yes | yes | yes | no | no | no |
output_format (png/jpeg) | examples pass png; reference restricts custom format to lite only — AMBIGUOUS, flag for live verification | yes (png/jpeg, default jpeg) | no (jpeg fixed) | no (jpeg fixed) | n/a | no (jpeg fixed) | no (jpeg fixed) |
optimize_prompt_options.mode | standard shape | standard only | standard only | standard + fast | no | no | no |
data[].size in response | yes | yes | yes | yes | no | no | no |
| Streaming (SSE) | yes | yes | yes | yes | no | no | no |
output_formaton non-liteseedream-5-0— documented contradiction. The request/response reference states “Only seedream-5-0-lite supports this parameter” and a tip that for seedream-4-5/4-0, seededit-3-0-i2i and seededit-3-0-t2i the format is jpeg-fixed (it does NOT mention non-lite 5-0). Yet every per-model example forseedream-5-0passes"output_format":"png". The per-parameter “supported on” clauses never enumerate a bare non-liteseedream-5-0, so attributing the lite support matrix to non-lite 5-0 is an inference, not a documented fact. Treat non-lite-5-0output_formatsupport as ambiguous; flag for live verification.
optimize_prompt_options.mode— exact wording. Reference: “Only seedream-5-0-lite/4-5 (only supports standard mode) and seedream-4-0 support this parameter.” Examples: “seedream-4-0 allows you to setoptimize_prompt_options.modetofast… seedream-5-0-lite and seedream-4-5 focus on high-quality image generation and only [support standard mode].” Sofastis valid on seedream-4-0 only;standardis the only mode on 5-0-lite and 4-5.
seed/guidance_scaleare legacy. The reference explicitly limits both toseedream-3-0-t2iandseededit-3-0-i2i. They are NOT supported on any 4.x/5.x model. A transparent-passthrough gateway must not silently inject them for Seedream 4.x/5.x.
Endpoint, auth
Section titled “Endpoint, auth”Endpoint (standard image-generations door): POST https://api.sociaro.com/v1/images/generations
Auth: header Authorization: Bearer $SOCIARO_API_KEY.
Content-Type: application/json
Call a Seedream model by passing its catalog slug in the model field (e.g. bytedance/seedream-5-0). The gateway routes the request to ByteDance’s image API on your behalf.
Image generation capabilities by model (verbatim from reference)
Section titled “Image generation capabilities by model (verbatim from reference)”seedream-5-0-lite (new), seedream-4-5, seedream-4-0:
- Generate multiple images in sequence (a batch of related images) — set
sequential_image_generationtoauto.- Batch from multiple reference images (2–14) + text prompt (input + output images ≤ 15).
- Batch (up to 14) from a single reference image + text prompt.
- Batch (up to 15) from text prompt.
- Generate a single image — set
sequential_image_generationtodisabled.- Single from multiple reference images (2–14) + text prompt.
- Single from a single reference image + text prompt.
- Single from text prompt.
seedream-3-0-t2i: Generate a single image from a text prompt.
seededit-3-0-i2i: Generate a single image from a single reference image + text prompt.
Request body shape
Section titled “Request body shape”{ "model": "bytedance/seedream-5-0", // required — catalog slug "prompt": "string", // required — recommend < 600 English words "image": "url-or-base64" | ["url1","url2", ...], // optional (i2i / multi-ref 2–14); seededit-3-0-i2i = single only; seededit-3-0-t2i = NOT supported "size": "2K" | "WIDTHxHEIGHT" | "adaptive", // optional, preset OR explicit pixels OR (seededit-3-0-i2i) adaptive "seed": 12345, // optional — ONLY seedream-3-0-t2i / seededit-3-0-i2i; default -1 "sequential_image_generation": "disabled" | "auto", // optional, default "disabled"; ONLY 5-0-lite/4-5/4-0 (+5-0 per tutorial) "sequential_image_generation_options": { // optional — only when sequential_image_generation = "auto" "max_images": 4 // int [1,15], default 15 }, "stream": false, // optional, default false; ONLY 5-0-lite/4-5/4-0 (+5-0 per tutorial) "guidance_scale": 2.5, // optional — ONLY seedream-3-0-t2i (def 2.5) / seededit-3-0-i2i (def 5.5); range [1,10] "output_format": "png" | "jpeg", // optional, default "jpeg"; reference: ONLY seedream-5-0-lite "response_format": "url" | "b64_json", // optional, default "url" "watermark": true, // optional, default true "optimize_prompt_options": { // optional — 5-0-lite (standard only), 4-5 (standard only), 4-0 (standard+fast) "mode": "standard" | "fast" // default "standard" }}Request parameters — full table
Section titled “Request parameters — full table”| Name | Type | Required | Default | Allowed values / range | Supported on | Description |
|---|---|---|---|---|---|---|
model | string | required | — | A valid catalog slug | all | The catalog slug used for image generation. e.g. bytedance/seedream-5-0, bytedance/seedream-5-0-lite, bytedance/seedream-4-5, bytedance/seedream-4-0. |
prompt | string | required | — | free text; recommend < 600 English words | all | Text prompt for generation. Overly long prompts may scatter info and cause the model to overlook details / miss elements. |
image | string OR array of strings | optional | — | URL or Base64 data URI | 5-0/5-0-lite/4-5/4-0 = single OR multiple (2–14); seededit-3-0-i2i = single only; seededit-3-0-t2i = NOT supported | Reference/edit image(s). URL: must be publicly accessible. Base64: data:image/<format>;base64,<encoding>, <format> lowercase, e.g. data:image/png;base64,.... See input-image constraints below. |
size | string | optional | pixel method default 2048x2048 (3-0-t2i default 1024x1024); preset method has no single default | per-model preset/pixel rules (see Size section) | all (rules differ per model) | Output image dimensions. Two mutually-exclusive methods: Method 1 = resolution preset (model picks W/H from prompt-described aspect/shape); Method 2 = explicit WIDTHxHEIGHT px. For seededit-3-0-i2i only adaptive. |
seed | integer | optional | -1 | [-1, 2147483647] | ONLY seedream-3-0-t2i and seededit-3-0-i2i | Random seed controlling randomness. -1/unspecified = random → different outputs each call. Same seed + same request → similar (not guaranteed identical) results. |
sequential_image_generation | string | optional | disabled | auto, disabled | ONLY seedream-5-0-lite, 4-5, 4-0 (and non-lite 5-0 per tutorial) | Whether to disable batch generation. auto: model decides whether/how many images to return based on the prompt. disabled: only one image generated. |
sequential_image_generation_options | object | optional | — | object with max_images | ONLY seedream-5-0-lite, 4-5, 4-0 (and 5-0) | Config for batch generation; effective only when sequential_image_generation = auto. |
sequential_image_generation_options.max_images | integer | optional | 15 | [1, 15] | as parent | Max images to generate this request. Actual count = jointly by max_images and number of input reference images: (input reference images + generated images) ≤ 15. |
stream | boolean | optional | false | true, false | ONLY seedream-5-0-lite, 4-5, 4-0 (and 5-0) | Streaming output mode. false: all images returned at once. true: each image returned immediately after it is generated (works for both single & batch). See Streaming Response section. |
guidance_scale | float | optional | seedream-3-0-t2i: 2.5; seededit-3-0-i2i: 5.5 | [1, 10] | ONLY seedream-3-0-t2i and seededit-3-0-i2i; seedream-5-0-lite/4-5/4-0 NOT supported | How closely the image follows the prompt (controls creative freedom). Higher = less freedom, more adherence. |
output_format | string (new) | optional | jpeg | png, jpeg | reference: ONLY seedream-5-0-lite | Output image file format. Tip: for seedream-4-5/4-0, seededit-3-0-i2i and seededit-3-0-t2i the default is jpeg and custom settings are not supported. (Non-lite seedream-5-0: tutorial curls pass png — ambiguous, flag for live verification.) |
response_format | string | optional | url | url, b64_json | all | How images are returned. Generated image is JPEG. url: download link, valid 24 hours after generation. b64_json: Base64-encoded image string inside JSON. |
watermark | boolean | optional | true | true, false | all | true: adds an “AI generated” watermark in the bottom-right corner. false: no watermark. |
optimize_prompt_options | object | optional | — | object with mode | ONLY seedream-5-0-lite/4-5 (standard only) and seedream-4-0 | Prompt optimization config. |
optimize_prompt_options.mode | string | optional | standard | standard, fast | fast valid only on seedream-4-0; 5-0-lite & 4-5 = standard only | standard: higher quality, longer generation time. fast: faster, more average quality. |
Input image constraints (image parameter, verbatim from reference)
Section titled “Input image constraints (image parameter, verbatim from reference)”- Format: jpeg, png. seedream-5-0-lite, 4-5 and 4-0 (new) also support webp, bmp, tiff, gif, heic, heif.
- Aspect ratio (width/height):
- within [1/16, 16] for seedream-5-0-lite, 4-5 and 4-0
- within [1/3, 3] for seededit-3-0-i2i and seededit-3-0-t2i
- Width & height (px): each > 14.
- Size: up to 30 MB.
- Total pixels: no more than 6000×6000 = 36,000,000 (limit is the product W×H, not each dimension).
- Max reference images: up to 14.
Batch failure-handling contract (part of the documented API surface)
Section titled “Batch failure-handling contract (part of the documented API surface)”When generating a batch with seedream-5-0-lite / 4-5 / 4-0, if an image fails:
- Content-filter rejection: the next generation task is still requested; other tasks in the same request are unaffected.
- Internal service error (500): the next image generation task is not requested.
(This same contract is restated in the streaming
image_generation.partial_failedevent description.)
Size parameter — per-model detail (Method 1 presets + Method 2 pixel rules)
Section titled “Size parameter — per-model detail (Method 1 presets + Method 2 pixel rules)”The reference renders size as per-model tabs. Each is reproduced exactly below.
seedream-5-0-lite (and, per tutorial, non-lite seedream-5-0)
Section titled “seedream-5-0-lite (and, per tutorial, non-lite seedream-5-0)”- Method 1 presets:
2K,3K,4K(describe aspect/shape/purpose in the prompt; model picks W/H). - Method 2 pixels: default
2048x2048; total-pixel range [2560x1440 = 3,686,400, 4096x4096 = 16,777,216]; aspect ratio range [1/16, 16]. Both constraints must hold simultaneously.- Valid example:
3750x1250(4,687,500 px ✓, ratio 3 ✓). - Invalid example:
1500x1500(2,250,000 px < 3,686,400 ✗) — fails pixel min even though ratio is fine.
- Valid example:
Recommended W×H presets:
| Resolution | Aspect ratio | W×H px |
|---|---|---|
| 2K | 1:1 | 2048x2048 |
| 2K | 4:3 | 2304x1728 |
| 2K | 3:4 | 1728x2304 |
| 2K | 16:9 | 2848x1600 |
| 2K | 9:16 | 1600x2848 |
| 2K | 3:2 | 2496x1664 |
| 2K | 2:3 | 1664x2496 |
| 2K | 21:9 | 3136x1344 |
| 3K | 1:1 | 3072x3072 |
| 3K | 4:3 | 3456x2592 |
| 3K | 3:4 | 2592x3456 |
| 3K | 16:9 | 4096x2304 |
| 3K | 9:16 | 2304x4096 |
| 3K | 2:3 | 2496x3744 |
| 3K | 3:2 | 3744x2496 |
| 3K | 21:9 | 4704x2016 |
| 4K | 1:1 | 4096x4096 |
| 4K | 3:4 | 3520x4704 |
| 4K | 4:3 | 4704x3520 |
| 4K | 16:9 | 5504x3040 |
| 4K | 9:16 | 3040x5504 |
| 4K | 2:3 | 3328x4992 |
| 4K | 3:2 | 4992x3328 |
| 4K | 21:9 | 6240x2656 |
seedream-4-5
Section titled “seedream-4-5”- Method 1 presets:
2K,4K(no 3K). - Method 2 pixels: default
2048x2048; total-pixel range [3,686,400, 16,777,216]; aspect ratio [1/16, 16]. Both must hold (same valid/invalid examples as 5-0-lite).
Recommended W×H presets (2K and 4K rows identical to the 5-0-lite table; there is no 3K tier):
| Resolution | Aspect ratio | W×H px |
|---|---|---|
| 2K | 1:1 | 2048x2048 |
| 2K | 4:3 | 2304x1728 |
| 2K | 3:4 | 1728x2304 |
| 2K | 16:9 | 2848x1600 |
| 2K | 9:16 | 1600x2848 |
| 2K | 3:2 | 2496x1664 |
| 2K | 2:3 | 1664x2496 |
| 2K | 21:9 | 3136x1344 |
| 4K | 1:1 | 4096x4096 |
| 4K | 3:4 | 3520x4704 |
| 4K | 4:3 | 4704x3520 |
| 4K | 16:9 | 5504x3040 |
| 4K | 9:16 | 3040x5504 |
| 4K | 2:3 | 3328x4992 |
| 4K | 3:2 | 4992x3328 |
| 4K | 21:9 | 6240x2656 |
seedream-4-0
Section titled “seedream-4-0”- Method 1 presets:
1K,2K,4K. - Method 2 pixels: default
2048x2048; total-pixel range [1280x720 = 921,600, 4096x4096 = 16,777,216] (lower minimum than 5-0-lite/4-5); aspect ratio [1/16, 16].- Valid example:
1600x600(960,000 px ✓, ratio 8/3 ✓). - Invalid example:
800x800(640,000 px < 921,600 ✗).
- Valid example:
Recommended W×H presets:
| Resolution | Aspect ratio | W×H px |
|---|---|---|
| 1K | 1:1 | 1024x1024 |
| 1K | 4:3 | 864x1152 |
| 1K | 3:4 | 1152x864 |
| 1K | 16:9 | 1280x720 |
| 1K | 9:16 | 720x1280 |
| 1K | 3:2 | 832x1248 |
| 1K | 2:3 | 1248x832 |
| 1K | 21:9 | 1512x648 |
| 2K | 1:1 | 2048x2048 |
| 2K | 4:3 | 2304x1728 |
| 2K | 3:4 | 1728x2304 |
| 2K | 16:9 | 2848x1600 |
| 2K | 9:16 | 1600x2848 |
| 2K | 3:2 | 2496x1664 |
| 2K | 2:3 | 1664x2496 |
| 2K | 21:9 | 3136x1344 |
| 4K | 1:1 | 4096x4096 |
| 4K | 3:4 | 3520x4704 |
| 4K | 4:3 | 4704x3520 |
| 4K | 16:9 | 5504x3040 |
| 4K | 9:16 | 3040x5504 |
| 4K | 2:3 | 3328x4992 |
| 4K | 3:2 | 4992x3328 |
| 4K | 21:9 | 6240x2656 |
seedream-3-0-t2i (pixels only; legacy)
Section titled “seedream-3-0-t2i (pixels only; legacy)”- No presets. Set W×H in pixels. Default
1024x1024. Total-pixel value range [512x512, 2048x2048].
| Aspect ratio | W×H px |
|---|---|
| 1:1 | 1024x1024 |
| 4:3 | 1152x864 |
| 3:4 | 864x1152 |
| 16:9 | 1280x720 |
| 9:16 | 720x1280 |
| 3:2 | 1248x832 |
| 2:3 | 832x1248 |
| 21:9 | 1512x648 |
seededit-3-0-i2i (adaptive only; legacy)
Section titled “seededit-3-0-i2i (adaptive only; legacy)”- Only
adaptiveis supported. The system compares the input image’s dimensions to the preset table below and selects the first available aspect ratio with the smallest difference from the original image’s ratio.
Full preset lookup (Width/Height ratio → Width × Height px), 53 rows verbatim:
| Width/Height | Width | Height |
|---|---|---|
| 0.33 | 512 | 1536 |
| 0.35 | 544 | 1536 |
| 0.38 | 576 | 1536 |
| 0.4 | 608 | 1536 |
| 0.42 | 640 | 1536 |
| 0.47 | 640 | 1376 |
| 0.51 | 672 | 1312 |
| 0.55 | 704 | 1280 |
| 0.56 | 736 | 1312 |
| 0.6 | 768 | 1280 |
| 0.63 | 768 | 1216 |
| 0.66 | 800 | 1216 |
| 0.67 | 832 | 1248 |
| 0.7 | 832 | 1184 |
| 0.72 | 832 | 1152 |
| 0.75 | 864 | 1152 |
| 0.78 | 896 | 1152 |
| 0.82 | 896 | 1088 |
| 0.85 | 928 | 1088 |
| 0.88 | 960 | 1088 |
| 0.91 | 992 | 1088 |
| 0.94 | 1024 | 1088 |
| 0.97 | 1024 | 1056 |
| 1 | 1024 | 1024 |
| 1.06 | 1056 | 992 |
| 1.1 | 1088 | 992 |
| 1.17 | 1120 | 960 |
| 1.24 | 1152 | 928 |
| 1.29 | 1152 | 896 |
| 1.33 | 1152 | 864 |
| 1.42 | 1184 | 832 |
| 1.46 | 1216 | 832 |
| 1.5 | 1248 | 832 |
| 1.56 | 1248 | 800 |
| 1.62 | 1248 | 768 |
| 1.67 | 1280 | 768 |
| 1.74 | 1280 | 736 |
| 1.82 | 1280 | 704 |
| 1.78 | 1312 | 736 |
| 1.86 | 1312 | 704 |
| 1.95 | 1312 | 672 |
| 2 | 1344 | 672 |
| 2.05 | 1376 | 672 |
| 2.1 | 1408 | 672 |
| 2.2 | 1408 | 640 |
| 2.25 | 1440 | 640 |
| 2.3 | 1472 | 640 |
| 2.35 | 1504 | 640 |
| 2.4 | 1536 | 640 |
| 2.53 | 1536 | 608 |
| 2.67 | 1536 | 576 |
| 2.82 | 1536 | 544 |
| 3 | 1536 | 512 |
Response shape (non-streaming)
Section titled “Response shape (non-streaming)”{ "model": "bytedance/seedream-5-0", // catalog slug used "created": 1757323224, // unix seconds, request creation time "data": [ // array of output image objects (or error objects) { "url": "https://...", // present when response_format=url (24h expiry) "b64_json": "...", // present when response_format=b64_json "size": "1760x2368" // <width>x<height>; only 5-0-lite/4-5/4-0 (+5-0) } // OR, for a failed image in a batch: // { "error": { "code": "...", "message": "..." } } ], "usage": { "generated_images": 1, // # successfully generated (billing basis) "output_tokens": 16280, // round( sum(W*H) / 256 ) "total_tokens": 16280 // == output_tokens (input tokens not counted) }, "error": { // top-level request error, if any "code": "...", "message": "..." }}Response parameters — table
Section titled “Response parameters — table”| Field | Type | Description |
|---|---|---|
model | string | Model ID used (model name-version). |
created | integer | Unix timestamp (seconds) of the request creation time. |
data | array | Output images. Each element is either an Image-info object or an Error-message object. Batch failure rule: content-filter rejection → next task still requested; internal 500 → next task NOT requested. |
data[].url | string | Image download URL; present when response_format=url. Expires within 24h of generation — save before expiry. |
data[].b64_json | string | Base64 image data; present when response_format=b64_json. |
data[].size | string | <width>x<height> px, e.g. 2048x2048. Only seedream-5-0-lite/4-5/4-0 (and 5-0) return this. |
data[].error | object | Error object for a failed image (within data). |
data[].error.code | string | Error code for the failed image. See Error Codes. |
data[].error.message | string | Error message for the failed image. |
usage | object | Usage info for the request. |
usage.generated_images | integer | # images successfully generated (excludes failures). Billing is per successfully generated image. |
usage.output_tokens | integer | Tokens consumed by generated images = round( sum(image_width × image_height) / 256 ). These are IMAGE tokens, not text tokens. |
usage.total_tokens | integer | Total tokens for the request; equals output_tokens (input tokens not currently counted). |
error | object | Top-level request error (if the whole request failed). |
error.code | string | Error code. See Error Codes. |
error.message | string | Error message. |
Streaming response (stream=true) — SSE event schema
Section titled “Streaming response (stream=true) — SSE event schema”Supported only on seedream-5-0-lite, seedream-4-5, seedream-4-0 (and non-lite 5-0 per tutorial). When stream=true, the server pushes events via Server-Sent Events (SSE) as the response is generated. There are three event types plus a top-level error.
Event image_generation.partial_succeeded
Section titled “Event image_generation.partial_succeeded”Returned when any single image is successfully generated.
| Field | Type | Description |
|---|---|---|
type | string | Always image_generation.partial_succeeded. |
model | string | Model ID used (<model_name>-<version>). |
created | integer | Unix timestamp (seconds) of the request creation time. |
image_index | integer | Index of the image for this event. Starts at 0 and auto-increments by 1 for BOTH partial_succeeded and partial_failed events, regardless of success. |
url | string | Image download URL; returned when response_format=url. |
b64_json | string | Base64 image; returned when response_format=b64_json. |
size | string | <width>×<height> px, e.g. 2048×2048. |
Example:
{ "type": "image_generation.partial_succeeded", "model": "bytedance/seedream-5-0", "created": 1589478378, "image_index": 0, "url": "https://...", "size": "2048×2048"}Event image_generation.partial_failed
Section titled “Event image_generation.partial_failed”Returned when any image fails to generate. Same failure contract: content-filter rejection → next task still requested; internal 500 → next task NOT requested.
| Field | Type | Description |
|---|---|---|
type | string | Always image_generation.partial_failed. |
model | string | Model ID used (<model_name>-<version>). |
created | integer | Unix timestamp (seconds) of the request creation time. |
image_index | integer | Index of the image for this event. Starts at 0; auto-increments for both partial events. |
error | object | Error reason for this event. |
error.code | string | Error code. See Error Codes. |
error.message | string | Error message. |
Example:
{ "type": "image_generation.partial_failed", "model": "bytedance/seedream-5-0", "created": 1589478378, "image_index": 2, "error": { "code": "OutputImageSensitiveContentDetected", "message": "The request failed because the output image may contain sensitive information." }}Event image_generation.completed
Section titled “Event image_generation.completed”Final event in the stream; returned after all requested images (successful or failed) have been processed.
| Field | Type | Description |
|---|---|---|
type | string | Always image_generation.completed. |
model | string | Model ID used (<model_name>-<version>). |
created | integer | Unix timestamp (seconds) of the request creation time. |
usage | object | Usage info for the request. |
usage.generated_images | integer | # successfully generated images (excludes failures). Billed only for successes. |
usage.output_tokens | integer | round( sum(picture_height × picture_width) / 256 ). |
usage.total_tokens | integer | Total tokens; equals output_tokens (input tokens not counted). |
Example:
{ "type": "image_generation.completed", "model": "bytedance/seedream-5-0", "created": 1589478378, "usage": { "generated_images": 2, "output_tokens": 16280, "total_tokens": 16280 }}Top-level streaming error
Section titled “Top-level streaming error”Returned for the current request if a request-level error occurs.
| Field | Type | Description |
|---|---|---|
error | object | Error message for this request. |
error.code | string | Error code. See Error Codes. |
error.message | string | Error message. |
Example:
"error": { "code": "BadRequest", "message": "The request failed because it is missing one or multiple required parameters. Request ID: {id}"}Examples
Section titled “Examples”Minimal — text-to-image
Section titled “Minimal — text-to-image”Request:
curl https://api.sociaro.com/v1/images/generations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $SOCIARO_API_KEY" \ -d '{ "model": "bytedance/seedream-5-0", "prompt": "Vibrant close-up editorial portrait, model with piercing gaze, wearing a sculptural hat, Vogue cover aesthetic, dramatic studio lighting." }'Response:
{ "model": "bytedance/seedream-5-0", "created": 1757323224, "data": [ { "url": "https://...", "size": "2048x2048" } ], "usage": { "generated_images": 1, "output_tokens": 16384, "total_tokens": 16384 }}Full A — single image, common knobs (verbatim tutorial example, seedream-5.0)
Section titled “Full A — single image, common knobs (verbatim tutorial example, seedream-5.0)”curl https://api.sociaro.com/v1/images/generations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $SOCIARO_API_KEY" \ -d '{ "model": "bytedance/seedream-5-0", "prompt": "Vibrant close-up editorial portrait, model with piercing gaze, wearing a sculptural hat, rich color blocking, sharp focus on eyes, shallow depth of field, Vogue magazine cover aesthetic, shot on medium format, dramatic studio lighting.", "size": "2K", "output_format": "png", "watermark": false }'Response:
{ "model": "bytedance/seedream-5-0", "created": 1757323224, "data": [ { "url": "https://...", "size": "1760x2368" } ], "usage": { "generated_images": 1, "output_tokens": 16280, "total_tokens": 16280 }}Full B — image-to-image (single reference, verbatim tutorial)
Section titled “Full B — image-to-image (single reference, verbatim tutorial)”curl https://api.sociaro.com/v1/images/generations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $SOCIARO_API_KEY" \ -d '{ "model": "bytedance/seedream-5-0", "prompt": "Keep the model'\''s pose and the flowing shape of the liquid dress unchanged. Change the clothing material from silver metal to completely transparent clear water (or glass). Through the liquid water, the model'\''s skin details are visible. Lighting changes from reflection to refraction.", "image": "https://example.com/assets/seedream4_5_imageToimage.png", "size": "2K", "output_format": "png", "watermark": false }'Full C — multi-reference image-to-image, single output (verbatim tutorial)
Section titled “Full C — multi-reference image-to-image, single output (verbatim tutorial)”curl https://api.sociaro.com/v1/images/generations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $SOCIARO_API_KEY" \ -d '{ "model": "bytedance/seedream-5-0", "prompt": "Replace the clothing in image 1 with the outfit from image 2.", "image": ["https://example.com/assets/seedream4_imagesToimage_1.png", "https://example.com/assets/seedream4_5_imagesToimage_2.png"], "sequential_image_generation": "disabled", "size": "2K", "output_format": "png", "watermark": false }'Full D — batch / sequential output from a single reference image (verbatim tutorial)
Section titled “Full D — batch / sequential output from a single reference image (verbatim tutorial)”curl https://api.sociaro.com/v1/images/generations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $SOCIARO_API_KEY" \ -d '{ "model": "bytedance/seedream-5-0", "prompt": "Using this LOGO as a reference, create a visual design system for an outdoor sports brand named GREEN, including packaging bags, hats, cards, lanyards, etc. Main visual tone is green, with a fun, simple, and modern style.", "image": "https://example.com/assets/seedream4_imageToimages.png", "size": "2K", "sequential_image_generation": "auto", "sequential_image_generation_options": { "max_images": 4 }, "stream": false, "output_format": "png", "response_format": "url", "watermark": false }'Full E — batch from multiple references (verbatim tutorial)
Section titled “Full E — batch from multiple references (verbatim tutorial)”curl https://api.sociaro.com/v1/images/generations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $SOCIARO_API_KEY" \ -d '{ "model": "bytedance/seedream-5-0", "prompt": "Generate 3 images of a girl and a cow plushie happily riding a roller coaster in an amusement park, depicting morning, noon, and night.", "image": ["https://example.com/assets/seedream4_imagesToimages_1.png", "https://example.com/assets/seedream4_imagesToimages_2.png"], "sequential_image_generation": "auto", "sequential_image_generation_options": { "max_images": 3 }, "size": "2K", "output_format": "png", "watermark": false }'Full F — seedream-4-0 with optimize_prompt fast mode (note fast mode, which is 4-0 only)
Section titled “Full F — seedream-4-0 with optimize_prompt fast mode (note fast mode, which is 4-0 only)”curl https://api.sociaro.com/v1/images/generations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $SOCIARO_API_KEY" \ -d '{ "model": "bytedance/seedream-4-0", "prompt": "Generate a series of 4 coherent illustrations focusing on the same corner of a courtyard across the four seasons, presented in a unified style that captures the unique colors, elements, and atmosphere of each season.", "size": "2K", "sequential_image_generation": "auto", "sequential_image_generation_options": { "max_images": 4 }, "optimize_prompt_options": { "mode": "fast" }, "stream": false, "output_format": "png", "response_format": "url", "watermark": false }'Gateway-relevant notes
Section titled “Gateway-relevant notes”- Billing: per
usage.generated_images(successful only);output_tokens = round(sum(W*H)/256),total_tokens == output_tokens. These are image tokens, not text tokens. - Output URL expiry: 24h. Persist before expiry.
- Do not inject
seed/guidance_scalefor Seedream 4.x/5.x — they are legacy params for seedream-3-0-t2i / seededit-3-0-i2i only and are unsupported on the 4.x/5.x models. output_formaton non-liteseedream-5-0: reference vs. example contradiction (jpeg-fixed per reference clause vs.pngin every example). Flag for live verification before relying on it.optimize_prompt_options.mode=fast: valid on seedream-4-0 only; 5-0-lite and 4-5 are standard-only.