ByteDanceImage

seedream-5-5

Image generation, editing and reference-image workflows across mainstream visual models.

Capabilities

  • Text-to-image
  • Reference image

Call it (async images)

Submit an image task, then poll data.task_id using the same key. Keep polling the original task while it runs and save temporary result links promptly.

See transparent PNG, layers and usage settlement

cURL
curl https://api.wanapis.com/v1/images/tasks \
  -H "Authorization: Bearer $WANAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "seedream-5-5",
  "prompt": "A red circle and a blue square on a white background",
  "size": "1K",
  "n": 1,
  "output_format": "png"
}'

# Replace task_xxx with data.task_id and keep polling the original task
curl https://api.wanapis.com/v1/images/tasks/task_xxx \
  -H "Authorization: Bearer $WANAPIS_API_KEY"
Python
import json
import os
import time
from urllib.request import Request, urlopen

url = "https://api.wanapis.com/v1/images/tasks"
headers = {
    "Authorization": "Bearer " + os.environ["WANAPIS_API_KEY"],
    "Content-Type": "application/json",
    "User-Agent": "Mozilla/5.0 WanAPIs image example",
}
payload = {
    "model": "seedream-5-5",
    "prompt": "A red circle and a blue square on a white background",
    "size": "1K",
    "n": 1,
    "output_format": "png"
}
with urlopen(Request(url, data=json.dumps(payload).encode(), headers=headers), timeout=60) as response:
    task_id = json.load(response)["data"]["task_id"]

while True:
    with urlopen(Request(url + "/" + task_id, headers=headers), timeout=60) as response:
        task = json.load(response)
    if task["data"]["status"] in ("SUCCESS", "FAILURE"):
        print(json.dumps(task, ensure_ascii=False))
        break
    time.sleep(3)

More ByteDance models

Integrate seedream-5-5 in minutes

Sign up for free trial credit and go live by changing one base_url line.