CoolFace
Apppublic

wavespeed/seedream4

sourceHugging Faceupdated 1mo agoView on Hugging Face
8likes
index.html206 linesDownload Raw Back to root
1<!doctype html>2<html lang="en">3<head>4	<meta charset="utf-8" />5	<meta name="viewport" content="width=device-width, initial-scale=1" />6	<title>Seedream 4.0 — ByteDance image generation and editing</title>7	<meta name="description" content="Reference for ByteDance&#x27;s Seedream 4.0 image model: generation and editing endpoints, high-resolution output, and hosted API usage." />8	<link rel="canonical" href="https://wavespeed.ai/models/bytedance/seedream-v4?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" />9 10	<meta property="og:type" content="website" />11	<meta property="og:title" content="Seedream 4.0 — ByteDance image generation and editing" />12	<meta property="og:description" content="Reference for ByteDance&#x27;s Seedream 4.0 image model: generation and editing endpoints, high-resolution output, and hosted API usage." />13	<meta property="og:url" content="https://wavespeed.ai/models/bytedance/seedream-v4" />14	<meta name="twitter:card" content="summary_large_image" />15 16	<link rel="stylesheet" href="style.css" />17</head>18<body>19	<header class="site-header">20		<div class="wrap">21			<a class="brand" href="https://wavespeed.ai?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" target="_blank" rel="noopener">22				<span class="brand-mark" aria-hidden="true"></span>23				<span>WaveSpeed AI</span>24			</a>25			<nav class="header-nav">26				<a class="jump opt" href="#capabilities">Capabilities</a>27				<a class="jump opt" href="#endpoints">Endpoints</a>28				<a class="jump" href="#run">Run it</a>29				<a class="jump" href="#resources">Resources</a>30				<a href="https://wavespeed.ai/models/bytedance/seedream-v4?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" target="_blank" rel="noopener">wavespeed.ai &#8599;</a>31			</nav>32		</div>33	</header>34 35	<main class="wrap">36		<div class="hero">37			<p class="eyebrow">ByteDance</p>38			<h1>Seedream 4.0</h1>39			<p class="lede">ByteDance's image generation and editing model. One model covers both text-to-image and instruction-based editing, with output up to 4K. Available as a hosted endpoint; weights are not publicly released.</p>40			<ul class="meta">41				<li><b>Developer</b> ByteDance</li>42				<li><b>Task</b> text-to-image · image editing</li>43				<li><b>Max output</b> 4K</li>44				<li><b>Weights</b> not public</li>45			</ul>46		</div>47 48		<section id="capabilities">49			<h2>Capabilities</h2>50			<p class="section-note">Characteristics reported by ByteDance. Treat them as vendor claims rather than independent measurements.</p>51			<div class="grid">52				<div class="card">53					<h3>Generation and editing in one model</h3>54					<p>The same checkpoint handles text-to-image and instruction-driven editing, so a generate-then-refine loop stays within one model.</p>55				</div>56				<div class="card">57					<h3>High-resolution output</h3>58					<p>Native output up to 4K without a separate upscaling pass.</p>59				</div>60				<div class="card">61					<h3>Reference-guided consistency</h3>62					<p>Accepts reference images to keep a subject or style stable across a set of generations — the basis for batch and series work.</p>63				</div>64				<div class="card">65					<h3>Text rendering</h3>66					<p>Handles typography inside the image, including Chinese, which most image models still degrade to unreadable glyphs.</p>67				</div>68			</div>69		</section>70		<section id="endpoints">71			<h2>Endpoints</h2>72			<div class="table-scroll">73				<table>74					<thead><tr><th>Endpoint</th><th>Task</th></tr></thead>75					<tbody>76						<tr><td><code>bytedance/seedream-v4</code></td><td>Text-to-image</td></tr>77						<tr><td><code>bytedance/seedream-v4/edit</code></td><td>Instruction-based editing</td></tr>78						<tr><td><code>bytedance/seedream-v4.5</code></td><td>Updated 4.5 checkpoint</td></tr>79					</tbody>80				</table>81			</div>82		</section>83		<section id="run">84			<h2>Run it</h2>85			<p class="section-note">Use <code>bytedance/seedream-v4/edit</code> with an additional <code>images</code> array to edit rather than generate.</p>86			<div class="code">87				<div class="code-tabs" role="tablist">88					<button type="button" role="tab" aria-selected="true" data-panel="run-0">cURL</button>89					<button type="button" role="tab" aria-selected="false" data-panel="run-1">Python</button>90					<button type="button" role="tab" aria-selected="false" data-panel="run-2">JavaScript</button>91				</div>92				<pre id="run-0" role="tabpanel"><code># 1. submit the job93curl -X POST &quot;https://api.wavespeed.ai/api/v3/bytedance/seedream-v4&quot; \94  -H &quot;Authorization: Bearer $WAVESPEED_API_KEY&quot; \95  -H &quot;Content-Type: application/json&quot; \96  -d &#x27;{97        &quot;prompt&quot;: &quot;An architectural photograph of a concrete stairwell, hard afternoon light, 35mm&quot;,98        &quot;size&quot;: &quot;2048*2048&quot;,99        &quot;enable_base64_output&quot;: false,100        &quot;enable_sync_mode&quot;: false101    }&#x27;102 103# -&gt; {&quot;code&quot;: 200, &quot;data&quot;: {&quot;id&quot;: &quot;&lt;request-id&gt;&quot;, &quot;status&quot;: &quot;created&quot;, ...}}104 105# 2. poll until status is &quot;completed&quot;106curl &quot;https://api.wavespeed.ai/api/v3/predictions/&lt;request-id&gt;/result&quot; \107  -H &quot;Authorization: Bearer $WAVESPEED_API_KEY&quot;108 109# -&gt; {&quot;code&quot;: 200, &quot;data&quot;: {&quot;status&quot;: &quot;completed&quot;, &quot;outputs&quot;: [&quot;https://...&quot;]}}</code></pre>110				<pre id="run-1" role="tabpanel" hidden><code>import os, time, requests111 112API = &quot;https://api.wavespeed.ai/api/v3&quot;113KEY = os.environ[&quot;WAVESPEED_API_KEY&quot;]114HEADERS = {&quot;Authorization&quot;: f&quot;Bearer {KEY}&quot;}115 116# submit117res = requests.post(118    f&quot;{API}/bytedance/seedream-v4&quot;,119    headers={**HEADERS, &quot;Content-Type&quot;: &quot;application/json&quot;},120    json={121      &quot;prompt&quot;: &quot;An architectural photograph of a concrete stairwell, hard afternoon light, 35mm&quot;,122      &quot;size&quot;: &quot;2048*2048&quot;,123      &quot;enable_base64_output&quot;: false,124      &quot;enable_sync_mode&quot;: false125    },126    timeout=30,127)128res.raise_for_status()129request_id = res.json()[&quot;data&quot;][&quot;id&quot;]130 131# poll132while True:133    data = requests.get(134        f&quot;{API}/predictions/{request_id}/result&quot;,135        headers=HEADERS,136        timeout=30,137    ).json()[&quot;data&quot;]138 139    if data[&quot;status&quot;] == &quot;completed&quot;:140        print(data[&quot;outputs&quot;][0])141        break142    if data[&quot;status&quot;] == &quot;failed&quot;:143        raise RuntimeError(data.get(&quot;error&quot;, &quot;generation failed&quot;))144    time.sleep(1.5)</code></pre>145				<pre id="run-2" role="tabpanel" hidden><code>const API = &quot;https://api.wavespeed.ai/api/v3&quot;;146const KEY = process.env.WAVESPEED_API_KEY;147const headers = { Authorization: `Bearer ${KEY}` };148 149// submit150const submit = await fetch(`${API}/bytedance/seedream-v4`, {151  method: &quot;POST&quot;,152  headers: { ...headers, &quot;Content-Type&quot;: &quot;application/json&quot; },153  body: JSON.stringify({154      &quot;prompt&quot;: &quot;An architectural photograph of a concrete stairwell, hard afternoon light, 35mm&quot;,155      &quot;size&quot;: &quot;2048*2048&quot;,156      &quot;enable_base64_output&quot;: false,157      &quot;enable_sync_mode&quot;: false158    }),159});160const { data: { id } } = await submit.json();161 162// poll163for (;;) {164  const res = await fetch(`${API}/predictions/${id}/result`, { headers });165  const { data } = await res.json();166 167  if (data.status === &quot;completed&quot;) {168    console.log(data.outputs[0]);169    break;170  }171  if (data.status === &quot;failed&quot;) throw new Error(data.error ?? &quot;generation failed&quot;);172  await new Promise((r) =&gt; setTimeout(r, 1500));173}</code></pre>174			</div>175			<div class="callout"><p>Requests are asynchronous: <code>POST</code> returns a request id, then you poll <code>/predictions/&lt;id&gt;/result</code> until <code>status</code> is <code>completed</code>. Set <code>enable_sync_mode: true</code> to have the call block and return outputs directly.</p><p>API keys are created in the <a href="https://wavespeed.ai/dashboard?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" target="_blank" rel="noopener">WaveSpeed dashboard</a>.</p></div>176			<div class="btn-row">177				<a class="btn" href="https://wavespeed.ai/models/bytedance/seedream-v4?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" target="_blank" rel="noopener">Open on WaveSpeed</a>178				<a class="btn secondary" href="https://wavespeed.ai/docs?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" target="_blank" rel="noopener">API reference</a>179			</div>180		</section>181		<section id="resources">182			<h2>Resources</h2>183			<ul class="links">184				<li><a href="https://wavespeed.ai/models/bytedance/seedream-v4?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" target="_blank" rel="noopener"><span>Seedream 4.0 endpoint</span><span class="host">wavespeed.ai</span></a></li>185				<li><a href="https://wavespeed.ai/models/bytedance/seedream-v4/edit?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" target="_blank" rel="noopener"><span>Editing endpoint</span><span class="host">wavespeed.ai</span></a></li>186				<li><a href="https://wavespeed.ai/models/bytedance/seedream-v4.5?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" target="_blank" rel="noopener"><span>Seedream 4.5</span><span class="host">wavespeed.ai</span></a></li>187				<li><a href="https://wavespeed.ai/collections/bytedance?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" target="_blank" rel="noopener"><span>ByteDance collection</span><span class="host">wavespeed.ai</span></a></li>188			</ul>189		</section>190	</main>191 192	<footer class="site-footer">193		<div class="wrap">194			<p>This page is a model reference maintained by WaveSpeed AI. The model itself is developed and released by its respective authors; trademarks belong to them. WaveSpeed AI provides hosted inference for it.</p>195			<div class="footer-links">196				<a href="https://wavespeed.ai?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" target="_blank" rel="noopener">WaveSpeed AI</a>197				<a href="https://wavespeed.ai/docs?utm_source=huggingface&amp;utm_medium=space&amp;utm_campaign=seedream4" target="_blank" rel="noopener">Docs</a>198				<a href="https://huggingface.co/wavespeed" target="_blank" rel="noopener">Hugging Face</a>199			</div>200		</div>201	</footer>202 203	<script src="tabs.js"></script>204</body>205</html>206