API
Video generation
Video generation is asynchronous: create a job, poll it until it finishes, then download the file.
Create a job
curl https://api.llm-hub.dev/v1/videos \
-H "Authorization: Bearer $LLMHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google-flow-veo-fast",
"prompt": "A banana-shaped spacecraft crossing Saturn rings",
"duration_seconds": 8,
"aspect_ratio": "16:9",
"resolution": "720p",
"client_request_id": "order-42-video-1"
}'The API returns 202 Accepted with a job such as {"id": "vidjob_...", "object": "video.job", "status": "queued", "cost_usd": ...}. client_request_id (or an Idempotency-Key header) makes retries safe: repeating it returns the same job.
Poll, download, cancel
curl https://api.llm-hub.dev/v1/videos/vidjob_JOB_ID \
-H "Authorization: Bearer $LLMHUB_API_KEY"
curl https://api.llm-hub.dev/v1/videos/vidjob_JOB_ID/content \
-H "Authorization: Bearer $LLMHUB_API_KEY" --output result.mp4
curl -X DELETE https://api.llm-hub.dev/v1/videos/vidjob_JOB_ID \
-H "Authorization: Bearer $LLMHUB_API_KEY"status moves through queued, running, and ends as succeeded, failed, or canceled. A succeeded job includes content_url. Failed and canceled jobs are refunded to the key balance.
Last updated
