Get Started
Integrate this model into your application with a few lines of code.
You need an API key to use this model.
Example request
A complete request you can copy and run in your language of choice.
# 1. Submit
SUBMIT=$(curl -sS --fail-with-body https://api.nunchux.ai/v1/bytedance/contents/generations/tasks \
-H "Authorization: Bearer $NUNCHUX_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: YourApp/1.0" \
-d '{
"model": "dreamina-seedance-2-5-260628",
"content": [
{
"type": "text",
"text": "A paper boat drifts down a rain-filled gutter, reflections of neon signs on the water"
}
],
"resolution": "720p",
"generate_audio": false
}') || { echo "submit failed: $SUBMIT" >&2; exit 1; }
TASK=$(jq -er '.id' <<<"$SUBMIT") || { echo "no task id in: $SUBMIT" >&2; exit 1; }
# 2. Poll until the task reaches a terminal status
DELAY=5
TERMINAL=0
for _ in $(seq 1 90); do
RESP=$(curl -sS https://api.nunchux.ai/v1/bytedance/contents/generations/tasks/$TASK \
-H "Authorization: Bearer $NUNCHUX_API_KEY" \
-H "User-Agent: YourApp/1.0")
STATUS=$(jq -r '.status' <<<"$RESP")
case "$STATUS" in succeeded|failed|cancelled|expired) TERMINAL=1; break ;; esac
sleep "$DELAY"; DELAY=$(( DELAY * 2 > 30 ? 30 : DELAY * 2 ))
done
[ "$TERMINAL" = 1 ] || { echo "timed out (last status: $STATUS)" >&2; exit 1; }
# 3. Check for failure
[ "$STATUS" = "succeeded" ] || { echo "Seedance: status $STATUS, not succeeded: $(jq -c '.error // empty' <<<"$RESP")" >&2; exit 1; }
# 4. Download
curl -sSL -o seedance.mp4 "$(jq -r '.content.video_url' <<<"$RESP")"