Seedream 4.0
Seedream 4.0 generates high-resolution, professional-grade visuals with superior text rendering for impactful design.
API
If you're looking for an API, you can choose from your desired programming language.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import requests
import base64
# Use this function to convert an image file from the filesystem to base64
def image_file_to_base64(image_path):
with open(image_path, 'rb') as f:
image_data = f.read()
return base64.b64encode(image_data).decode('utf-8')
# Use this function to fetch an image from a URL and convert it to base64
def image_url_to_base64(image_url):
response = requests.get(image_url)
image_data = response.content
return base64.b64encode(image_data).decode('utf-8')
# Use this function to convert a list of image URLs to base64
def image_urls_to_base64(image_urls):
return [image_url_to_base64(url) for url in image_urls]
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/seedream-4"
# Request payload
data = {
"size": "2K",
"width": 2048,
"height": 2048,
"prompt": "Action hero into an apocalypse survivor zombie hunter, torn leather jacket with spikes, glowing red cybernetic eye, dual chainsaw weapons, burning city ruins background, blood splatter effects, horror movie aesthetic, badass energy, ultra-detailed gore",
"max_images": 1,
"image_input": [
"https://segmind-resources.s3.amazonaws.com/input/ee043397-b857-4bf2-9ad0-70258a286e96-504cf296-f8c3-40af-b200-9b52bdae240c.png"
],
"aspect_ratio": "match_input_image",
"sequential_image_generation": "disabled"
}
headers = {'x-api-key': api_key}
response = requests.post(url, json=data, headers=headers)
print(response.content) # The response is the generated image
Attributes
Specifies image resolution. Use '2K' for standard images, '4K' for high-res, 'custom' for unique needs.
Allowed values:
Defines width when size is 'custom'. Use 1024 for thumbnails, 4096 for detailed art.
min : 1024,
max : 4096
Defines height when size is 'custom'. Set 1024 for small images, 4096 for large posters.
min : 1024,
max : 4096
Text describing the image to generate. Include subjects like 'sunset mountain view'.
Sets image generation limit. Choose 1 for single outcome, 5 for multiple.
min : 1,
max : 15
List of image URLs to guide generation. Use for reference; add 1-3 URLs.
Determines image proportions. Select '16:9' for widescreen, '1:1' for square format.
Allowed values:
Controls image creation order. Enable 'auto' for batch generation, 'disabled' otherwise.
Allowed values:
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Resources to get you started
Everything you need to know to get the most out of Seedream 4.0
Seedream 4.0: Effective Use Guide
Seedream 4.0 is ByteDance’s cutting-edge text-to-image model tailored for professional visuals with outstanding text rendering. Whether you’re crafting marketing banners, detailed infographics or stylized artwork, this guide covers parameter settings and best practices to maximize quality and efficiency.
Getting Started
• prompt (required): Describe subjects, layout and style (e.g., “minimalist tech poster with blue gradient, bold sans-serif title”).
• size:
– 2K (2048×2048) for quick drafts and social media.
– 4K (4096×4096) for high-resolution posters and print.
– custom with width, height sliders (1024–4096px) for unique formats.
• aspect_ratio: Choose from “1:1”, “16:9”, “9:16” or match input.
• max_images: 1–15 outputs per prompt.
• image_input: Up to 3 reference URLs for style/branding consistency.
• sequential_image_generation: “auto” for stepwise themes, “disabled” for independent variations.
Use Case Recommendations
1. Marketing & Advertising
- •size: 2K for social ads, 4K for print materials
- •aspect_ratio: 16:9 (web ads) or 1:1 (Instagram)
- •max_images: 3–5 to compare layouts
- •image_input: logos and brand color swatches
- •sequential_image_generation: disabled
2. Professional Posters & Infographics
- •size: 4K with width=4096, height=4096 for large prints
- •aspect_ratio: 4:3 or 1:1 depending on display
- •max_images: 1–2 for focused designs
- •prompt: specify text areas, icons, charts
- •sequential_image_generation: disabled for one-shot precision
3. Product Visualization
- •size: 2K or custom (3000×2000) for catalog shots
- •aspect_ratio: 3:2 or 2:3 for print catalogs
- •max_images: 5 to explore angles
- •image_input: 1–2 product photos for texture reference
- •sequential_image_generation: auto to build a consistent set
4. Creative Artwork & Thumbnails
- •size: 1K (1024×1024) for thumbnails, 2K for digital banners
- •aspect_ratio: 9:16 for mobile stories, 21:9 for cinematic banners
- •max_images: 6–8 for batch creativity
- •prompt: include style tags (“anime style”, “oil painting”)
- •sequential_image_generation: auto to generate thematic series
Best Practices
- •Start with 2K drafts, then upscale to 4K if needed.
- •Use clear, structured prompts: separate subjects, styles, text instructions.
- •Employ reference images for consistent branding or fine details.
- •Iterate with small batches (max_images=3) before a full run.
- •Experiment with aspect ratios to match your final medium.
By tuning these parameters and following prompt guidelines, you’ll harness Seedream 4.0 to create stunning, high-impact visuals across any medium. Enjoy designing!
Other Popular Models
Discover other models you might be interested in.
illusion-diffusion-hq
Monster Labs QrCode ControlNet on top of SD Realistic Vision v5.1

faceswap-v2
Take a picture/gif and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training

insta-depth
InstantID aims to generate customized images with various poses or styles from only a single reference ID image while ensuring high fidelity

sd1.5-majicmix
The most versatile photorealistic model that blends various models to achieve the amazing realistic images.
