Nunchux
MODEL
Wan-3.0

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.
# The media URL below is a placeholder. Point it at your own publicly
# reachable file before running this.
# 1. Submit
SUBMIT=$(curl -sS --fail-with-body https://api.nunchux.ai/v1/alibaba/services/aigc/video-generation/video-synthesis \
  -H "Authorization: Bearer $NUNCHUX_API_KEY" \
  -H "Content-Type: application/json" \
  -H "User-Agent: YourApp/1.0" \
  -d '{
        "model": "wan3.0-video",
        "input": {
            "prompt": "0-3s The video opens in slow motion at 240 fps. A chef'\''s knife slices cleanly through young rosemary sprigs. Tiny water droplets clinging to the leaves shake loose from the impact, scattering and splashing through the air in drawn-out slow motion. The visuals deliver an immensely soothing, deeply satisfying cutting motion. 3-8s Smooth transition: The cut shifts instantly to a preheated cast-iron pan. A steak drops into the frame with speed ramping—fast descent, slowed impact.",
            "media": [
                {
                    "type": "first_frame",
                    "url": "https://example.com/example.jpg"
                }
            ]
        },
        "parameters": {
            "resolution": "720P",
            "duration": 5,
            "watermark": false
        }
    }') || { echo "submit failed: $SUBMIT" >&2; exit 1; }
TASK=$(jq -er '.output.task_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/alibaba/tasks/$TASK \
    -H "Authorization: Bearer $NUNCHUX_API_KEY" \
    -H "User-Agent: YourApp/1.0")
  STATUS=$(jq -r '.output.task_status' <<<"$RESP")
  case "$STATUS" in SUCCEEDED|FAILED|CANCELED) 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 "Alibaba Cloud: status $STATUS, not SUCCEEDED: $(jq -c '.output.message // empty' <<<"$RESP")" >&2; exit 1; }

# 4. Download
curl -sSL -o alibaba.mp4 "$(jq -r '.output.video_url' <<<"$RESP")"

Get help setting up a Dedicated Enterprise Endpoint

Contact our sales team to get discounted rates for monthly reserved endpoints on the latest GPUs

Contact Sales