1# 1. Submit the job: answers 202 with an id and a status_url
2STATUS_URL=$(curl -s https://api.opper.ai/v3/videos \
3 -H "Authorization: Bearer $OPPER_API_KEY" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "model": "fal/minimax-h3",
7 "prompt": "A paper boat drifting down a rain-soaked street at dusk",
8 "seconds": 5,
9 "resolution": "768p",
10 "aspect_ratio": "16:9",
11 "image": "https://example.com/first-frame.png"
12 }' | jq -r .status_url)
13
14# 2. Poll the status_url (GET /v3/artifacts/{id}/status) until "status"
15# is "completed" (or "failed")
16curl "$STATUS_URL" -H "Authorization: Bearer $OPPER_API_KEY"
17
18# 3. Download the clip from the "url" in the completed status
19curl -o video.mp4 "<url>"