빠른 시작

요청 세 번이면 홈페이지의 영상을 생성할 수 있습니다. API 키가 필요합니다. 한 뒤 CHEAPVIDEO_API_KEY 환경 변수로 설정하세요.

1. 작업 제출

요청
curl https://api.cheapvideo.ai/v1/videos \
  -H "Authorization: Bearer $CHEAPVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.0-mini",
    "prompt": "A paper boat drifting down a rainy city gutter at dusk, neon reflections, close-up tracking shot",
    "resolution": "720p",
    "duration": 5
  }'
응답
{
  "id": "task_8f2c1a",
  "status": "queued"
}

2. 상태 조회

status가 succeeded 또는 failed가 될 때까지 몇 초마다 반복합니다.

요청
curl https://api.cheapvideo.ai/v1/videos/task_8f2c1a \
  -H "Authorization: Bearer $CHEAPVIDEO_API_KEY"
응답
{
  "id": "task_8f2c1a",
  "status": "succeeded",
  "video_url": "https://cdn.cheapvideo.dev/task_8f2c1a.mp4",
  "duration": 5,
  "cost_usd": 0.40
}

3. 영상 다운로드

요청
curl -o clip.mp4 https://cdn.cheapvideo.dev/task_8f2c1a.mp4