← All models
Seedream 5
images
ByteDance Seedream 5 — artistic image generation model.
Pricing
0.05 $
Image
Price uses the live FX rate — shown equals charged.
Parameters
promptrequiredaspect_ratio1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 21:9 · 5:4 · 4:5resolution1k · 2k · 4ksize2550x2550 · 3399x1912 · 1912x3399 · 2944x2208 · 2208x2944 · 3122x2082 · 2082x3122 · 3894x1669 · 2850x2280 · 2280x2850 · 3873x3873 · 4096x2304 · 2304x4096 · 4096x3072 · 3072x4096 · 4096x2731 · 2731x4096 · 4096x1755 · 4096x3277 · 3277x4096imageimage-to-image (via /v1/images/edits)How to use via API
import base64from openai import OpenAIclient = OpenAI(base_url="https://api.mixen.ai/v1", api_key="mxn-...")img = client.images.generate(model="seedream-5-0-260128",prompt="Милый кот-космонавт на Марсе",size="2550x2550", # либо extra_body={"aspect_ratio": "1:1", "resolution": "1k"}n=1,)with open("image.png", "wb") as f:f.write(base64.b64decode(img.data[0].b64_json))# image-to-image: передать референс(ы) через multipartedited = client.images.edit(model="seedream-5-0-260128",image=open("photo.png", "rb"), # один или несколько референсовprompt="Добавь неоновую вывеску на фасад, сохрани композицию",)with open("edited.png", "wb") as f:f.write(base64.b64decode(edited.data[0].b64_json))

