ByteDance ์ ๊ณต
ByteDance Seedream 5.5 text-to-image with reference images, billed per generated image: by some providers at the price of its size tier โ up to 2.61 MP, or above โ plus a price per reference image, by others at one price per image (each provider's pricing says which). One image per request (`n` must be 1). `size` is `<width>x<height>`, 921,600โ4,624,220 pixels in total with each side up to 4096 (e.g. 1424x800, 2560x1440); omit it and the provider picks the size. Up to 10 reference images in `image` or `images` (a string or an array of HTTP or `data:image/...` URLs). Optional: `output_format` (`png` or `jpeg`), `background` (`transparent`, `opaque` or `auto`), `watermark` (true adds an AI-generated mark; default false).
$0.027
์ด๋ฏธ์ง๋น
curl "https://router-api.0g.ai/v1/images/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "seedream-image-v5.5",
"prompt": "A futuristic city skyline at sunset",
"n": 1,
"response_format": "b64_json"
}'
# Response: {"data": [{"b64_json": "..."}], "x_0g_trace": {...}}
# Generation takes seconds to about a minute; the request stays open until the images are ready.์ ๊ณต์ ๋ผ์ฐํ
X-0G-Provider-* ์์ฒญ ํค๋๋ฅผ ์ฌ์ฉํ์ฌ ์์ฒญ์ ์ฒ๋ฆฌํ ์ ๊ณต์๋ฅผ ์ ์ดํฉ๋๋ค.
X-0G-Provider-Address๋ ์ ๊ณต์๋ฅผ ๊ณ ์ ํ๊ณ , X-0G-Provider-Identity๋ ํด๋น ์ ๊ณต์์ ์
์คํธ๋ฆผ ์ค ์ด๋ ๊ฒ์ ํตํด ๋ผ์ฐํ
ํ ์ง ๊ณ ์ ํฉ๋๋ค. ๋ ๊ฐ ๋ชจ๋ GET /v1/providers์ address ๋ฐ provider_identity ํ๋์์ ๊ฐ์ ธ์ต๋๋ค. ์ด ๋์ ํจ๊ป ์ฌ์ฉํ๋ฉด ํน์ ์ ๊ณต์์ ํน์ ์
์คํธ๋ฆผ ํ๋๋ฅผ ์ง์ ํฉ๋๋ค. ๋ ๋ค ๋ณด๋ด์ง ์์ผ๋ฉด ๋ผ์ฐํฐ๋ ์ด์ ๊ณผ ๋๊ฐ์ด ๊ฐ๊ฒฉ๊ณผ ์ํ์ ๋ฐ๋ผ ์ ํํฉ๋๋ค.
curl "https://router-api.0g.ai/v1/images/generations" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-H "X-0G-Provider-Address: <PROVIDER_ADDRESS>" \
-H "X-0G-Provider-Identity: <UPSTREAM>" \
-H "X-0G-Provider-Sort: latency" \
-H "X-0G-Provider-Allow-Fallbacks: true" \
-d '{
"model": "seedream-image-v5.5",
"prompt": "A futuristic city skyline at sunset"
}'