Seedream 4.5
Text-to-Image • ByteDance • ProxiedSeedream 4.5 builds on 4.0 with multi-reference image support, batch generation, and sequential image generation.
| Model Info | |
|---|---|
| More information | link ↗ |
| Pricing | View pricing in the Cloudflare dashboard ↗ |
Usage
const response = await env.AI.run( 'bytedance/seedream-4.5', { prompt: 'A cozy reading nook with floor-to-ceiling bookshelves and a comfortable armchair', }, { gateway: { id: 'default' }, })console.log(response)
{ "state": "Completed", "result": { "images": [ "https://ark-content-generation-v2-ap-southeast-1.tos-ap-southeast-1.volces.com/seedream-4-5/0217764052077481386b9a8ed856c57501cfa946ce34c9865285c_0.jpeg" ] }, "gatewayMetadata": { "keySource": "Unified" }}Examples
High Resolution — 4K quality image generation
const response = await env.AI.run( 'bytedance/seedream-4.5', { prompt: 'A hyperrealistic still life painting of fresh fruit on an antique wooden table with dramatic chiaroscuro lighting', size: '4K', aspect_ratio: '4:3', }, { gateway: { id: 'default' }, })console.log(response)
{ "state": "Completed", "result": { "images": [ "https://ark-content-generation-v2-ap-southeast-1.tos-ap-southeast-1.volces.com/seedream-4-5/0217764052077581386b9a8ed856c57501cfa946ce34c985dabe3_0.jpeg" ] }, "gatewayMetadata": { "keySource": "Unified" }}Image-to-Image — Edit using reference images
const response = await env.AI.run( 'bytedance/seedream-4.5', { prompt: 'Transform this scene into a winter wonderland with snow covering everything', image_input: [ 'https://replicate.delivery/xezq/0lxxNQSg3NabCZrDiQVAPGVmjP1Q2dd7TgYCOTfI9LpyZaMLA/tmp89gopylq.jpg', ], aspect_ratio: 'match_input_image', }, { gateway: { id: 'default' }, })console.log(response)
{ "state": "Completed", "result": { "images": [ "https://ark-content-generation-v2-ap-southeast-1.tos-ap-southeast-1.volces.com/seedream-4-5/0217764052176861386b9a8ed856c57501cfa946ce34c98846458_0.jpeg" ] }, "gatewayMetadata": { "keySource": "Unified" }}Sequential Generation — Generate multiple related images
const response = await env.AI.run( 'bytedance/seedream-4.5', { prompt: 'A character design sheet for a fantasy warrior: front view, side view, and back view', aspect_ratio: '16:9', sequential_image_generation: 'auto', max_images: 3, }, { gateway: { id: 'default' }, })console.log(response)
{ "state": "Completed", "result": { "images": [ "https://ark-content-generation-v2-ap-southeast-1.tos-ap-southeast-1.volces.com/seedream-4-5/0217764052291261386b9a8ed856c57501cfa946ce34c98481db1_0.jpeg" ] }, "gatewayMetadata": { "keySource": "Unified" }}Multi-Image Edit — Combine multiple reference images
const response = await env.AI.run( 'bytedance/seedream-4.5', { prompt: 'Combine the style of the first image with the subject from the second image', image_input: [ 'https://replicate.delivery/xezq/TRYcLgNMrBpPJVq09ICKXWe4Z8d6olzpK5vtQPOB8O23ZaMLA/tmpaecga26m.jpg', 'https://replicate.delivery/xezq/1SbAc0aXYXbVD9doyrdCW78hYufVefMsaJXBrETN7Lu2npxsA/tmphvkx7emy.jpg', ], size: '2K', }, { gateway: { id: 'default' }, })console.log(response)
{ "state": "Completed", "result": { "images": [ "https://ark-content-generation-v2-ap-southeast-1.tos-ap-southeast-1.volces.com/seedream-4-5/0217764052323791386b9a8ed856c57501cfa946ce34c98b2f132_0.jpeg" ] }, "gatewayMetadata": { "keySource": "Unified" }}Parameters
stringrequiredarrayformat: uristringenum: 2K, 4Kstringenum: match_input_image, 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9stringenum: disabled, autointegerminimum: 1maximum: 15booleanarrayminItems: 1format: uri