All models

ByteDance: Seedream 5.0 Lite

seedream-5-0-lite
images

The lightweight Seedream from ByteDance: fast, affordable image generation. Supports references and wide formats.

Pricing

Image

Parameters

promptrequired
aspect_ratio1:1 · 1:2 · 2:1 · 2:3 · 3:2 · 3:4 · 4:3 · 4:5 · 5:4 · 9:16 · 9:21 · 16:9 · 21:9
resolution2k · 4k
size876x2048 · 2048x876 · 1024x2048 · 2048x1024 · 1152x2048 · 2048x1152 · 1364x2048 · 2048x1364 · 1536x2048 · 2048x1536 · 1638x2048 · 2048x1638 · 2048x2048 · 1754x4096 · 4096x1754 · 2048x4096 · 4096x2048 · 2304x4096 · 4096x2304 · 2730x4096 · 4096x2730 · 3072x4096 · 4096x3072 · 3276x4096 · 4096x3276 · 4096x4096
imageimage-to-image (via /v1/images/edits)

How to use via API

import base64
from openai import OpenAI
client = OpenAI(base_url="https://api.mixen.ai/v1", api_key="mxn-...")
img = client.images.generate(
model="seedream-5-0-lite",
prompt="Милый кот-космонавт на Марсе",
size="876x2048", # либо extra_body={"aspect_ratio": "1:1", "resolution": "2k"}
n=1,
)
with open("image.png", "wb") as f:
f.write(base64.b64decode(img.data[0].b64_json))
# image-to-image: передать референс(ы) через multipart
edited = client.images.edit(
model="seedream-5-0-lite",
image=open("photo.png", "rb"), # один или несколько референсов
prompt="Добавь неоновую вывеску на фасад, сохрани композицию",
)
with open("edited.png", "wb") as f:
f.write(base64.b64decode(edited.data[0].b64_json))
Try in the botAPI docs