{ "model_id": "bytedance/seedream-4.0", "provider_id": "bytedance", "name": "Seedream 4.0", "description": "Seedream 4.0 is ByteDance's image creation model that combines text-to-image generation and image editing into a single architecture, offering fast, high-resolution output up to 4K.", "task": "Text-to-Image", "tags": [ "Image Generation", "Image Editing", "High Resolution" ], "context_length": null, "max_output_tokens": null, "schema_version": "1.0.0", "pricing": { "Per image": 0.03 }, "examples": [ { "name": "Simple Generation", "description": "Basic text-to-image generation", "input": { "prompt": "A serene mountain lake surrounded by pine trees at dawn" }, "output": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/bytedance__seedream-4.0/simple-generation.jpeg" }, "raw_response": { "gatewayMetadata": { "keySource": "Unified" }, "result": { "image": "https://ark-content-generation-v2-ap-southeast-1.tos-ap-southeast-1.volces.com/seedream-4-0/021776387438887c5f50319cb4d4388d7836967b82aebe5227f8d_0.jpeg" }, "state": "Completed" }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'bytedance/seedream-4.0',\n { prompt: 'A serene mountain lake surrounded by pine trees at dawn' },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"bytedance/seedream-4.0\",\n \"input\": {\n \"prompt\": \"A serene mountain lake surrounded by pine trees at dawn\"\n }\n}'" } ] }, { "name": "High Resolution", "description": "4K quality image generation", "input": { "prompt": "A detailed steampunk mechanical owl with brass gears and copper feathers, intricate clockwork visible", "aspect_ratio": "1:1", "size": "4K" }, "output": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/bytedance__seedream-4.0/high-resolution.jpeg" }, "raw_response": { "gatewayMetadata": { "keySource": "Unified" }, "result": { "image": "https://ark-content-generation-v2-ap-southeast-1.tos-ap-southeast-1.volces.com/seedream-4-0/021776387448153c5f50319cb4d4388d7836967b82aebe5807cbc_0.jpeg" }, "state": "Completed" }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'bytedance/seedream-4.0',\n {\n prompt:\n 'A detailed steampunk mechanical owl with brass gears and copper feathers, intricate clockwork visible',\n aspect_ratio: '1:1',\n size: '4K',\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"bytedance/seedream-4.0\",\n \"input\": {\n \"prompt\": \"A detailed steampunk mechanical owl with brass gears and copper feathers, intricate clockwork visible\",\n \"aspect_ratio\": \"1:1\",\n \"size\": \"4K\"\n }\n}'" } ] }, { "name": "Widescreen Landscape", "description": "Cinematic aspect ratio image", "input": { "prompt": "A vast alien desert landscape with two suns setting on the horizon, ancient ruins in the foreground", "aspect_ratio": "21:9", "size": "2K" }, "output": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/bytedance__seedream-4.0/widescreen-landscape.jpeg" }, "raw_response": { "gatewayMetadata": { "keySource": "Unified" }, "result": { "image": "https://ark-content-generation-v2-ap-southeast-1.tos-ap-southeast-1.volces.com/seedream-4-0/021776387469085c5f50319cb4d4388d7836967b82aebe5dcf17e_0.jpeg" }, "state": "Completed" }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'bytedance/seedream-4.0',\n {\n prompt:\n 'A vast alien desert landscape with two suns setting on the horizon, ancient ruins in the foreground',\n aspect_ratio: '21:9',\n size: '2K',\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"bytedance/seedream-4.0\",\n \"input\": {\n \"prompt\": \"A vast alien desert landscape with two suns setting on the horizon, ancient ruins in the foreground\",\n \"aspect_ratio\": \"21:9\",\n \"size\": \"2K\"\n }\n}'" } ] }, { "name": "Portrait Format", "description": "Vertical image for portraits", "input": { "prompt": "An elegant Art Deco poster featuring a jazz singer under a spotlight", "aspect_ratio": "9:16", "enhance_prompt": true }, "output": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/bytedance__seedream-4.0/portrait-format.jpeg" }, "raw_response": { "gatewayMetadata": { "keySource": "Unified" }, "result": { "image": "https://ark-content-generation-v2-ap-southeast-1.tos-ap-southeast-1.volces.com/seedream-4-0/021776387475078c5f50319cb4d4388d7836967b82aebe5e6ec81_0.jpeg" }, "state": "Completed" }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'bytedance/seedream-4.0',\n {\n prompt: 'An elegant Art Deco poster featuring a jazz singer under a spotlight',\n aspect_ratio: '9:16',\n enhance_prompt: true,\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"bytedance/seedream-4.0\",\n \"input\": {\n \"prompt\": \"An elegant Art Deco poster featuring a jazz singer under a spotlight\",\n \"aspect_ratio\": \"9:16\",\n \"enhance_prompt\": true\n }\n}'" } ] }, { "name": "Detailed 4K", "description": "High-resolution detailed botanical illustration", "input": { "prompt": "A detailed botanical illustration of exotic tropical flowers", "aspect_ratio": "3:4", "size": "4K" }, "output": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/bytedance__seedream-4.0/detailed-4k.jpeg" }, "raw_response": { "gatewayMetadata": { "keySource": "Unified" }, "result": { "image": "https://ark-content-generation-v2-ap-southeast-1.tos-ap-southeast-1.volces.com/seedream-4-0/021776441662380e1f2c28e220bf76d8a56e2a46eaa08e982d37f_0.jpeg" }, "state": "Completed" }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'bytedance/seedream-4.0',\n {\n prompt: 'A detailed botanical illustration of exotic tropical flowers',\n aspect_ratio: '3:4',\n size: '4K',\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"bytedance/seedream-4.0\",\n \"input\": {\n \"prompt\": \"A detailed botanical illustration of exotic tropical flowers\",\n \"aspect_ratio\": \"3:4\",\n \"size\": \"4K\"\n }\n}'" } ] } ], "default_example": null, "code_snippets": [], "supports_async": false, "zdr": false, "zdr_comment": null, "external_info": "https://seed.bytedance.com/en/seedream4_0", "terms": null, "cover_image_url": "https://pub-26f1392c1b674324be6786695bd72257.r2.dev/bytedance/seedream-4.0.png", "metadata": { "Editing": "Yes (single-sentence)", "Max Resolution": "4K" }, "request_formats": null, "providers": null, "provider_details": [ { "id": "bytedance", "pricing": { "output_image_count": 0.03 } } ], "banner": null, "created_at": "2026-05-22 17:53:05", "schema": { "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "prompt": { "type": "string" }, "size": { "type": "string", "enum": [ "1K", "2K", "4K", "custom" ] }, "aspect_ratio": { "type": "string", "enum": [ "match_input_image", "1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3", "21:9" ] }, "width": { "type": "integer", "minimum": 1024, "maximum": 4096 }, "height": { "type": "integer", "minimum": 1024, "maximum": 4096 }, "enhance_prompt": { "type": "boolean" } }, "required": [ "prompt" ], "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "image": { "type": "string", "format": "uri" } }, "required": [ "image" ], "additionalProperties": false } } }