Video API — Video Generation, Polling & Webhooks
Create an account via signup or POST /v1/auth/register, then call task endpoints with Authorization: Bearer <token>. Default provider is mock; set VIDEO_PROVIDER=fal and FAL_KEY for real clips.
POST /v1/auth/register/POST /v1/auth/login— email + password → JWT + creditsGET /v1/me— current user and credit balancePOST /v1/tasks— start text-to-video or image-to-videoGET /v1/tasks/:id— status polling (queued|running|succeeded|failed)GET /v1/health— liveness + active provider name
Create a text-to-video task
POST /v1/tasks
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"type": "text-to-video",
"prompt": "A sneaker on wet asphalt, cinematic light"
}
→ 201 { "id": "…", "status": "queued", "creditsCharged": 10 }
Poll until complete
GET /v1/tasks/TASK_ID
Authorization: Bearer YOUR_TOKEN
→ { "status": "succeeded", "outputUrl": "https://…/clip.mp4", "progress": 1 }
Image-to-video requires imageUrl. Failed jobs refund charged credits. Try the UI at /app.