Everything you need to integrate AI video generation into your application. REST endpoints, authentication, webhooks, error handling, and batch workflows.
Get API Key →
US Video API is a standard REST API that accepts JSON request bodies and returns JSON responses. All endpoints are served over HTTPS at https://usvideoapi.com. The API uses bearer token authentication and returns standard HTTP status codes.
Video generation is asynchronous. You submit a job, receive a job ID, and then poll for completion or receive a webhook callback. This design handles the 30–90 second generation time without blocking your HTTP connection.
Every request must include your API key in the Authorization header:
Authorization: Bearer usv_live_abc123def456...
API keys are generated when you register and can be rotated at any time from your dashboard. Keys prefixed with usv_live_ are production keys that deduct from your balance. Keys prefixed with usv_test_ are sandbox keys that return mock responses without charge.
Create a video generation job. Accepts prompt, resolution (480p/720p/1080p), duration (1–10), optional first_frame for image-to-video, optional webhook_url for async callbacks. Returns job ID, status, and estimated cost.
Retrieve the status and details of a video generation job. Returns pending, processing, completed, or failed. When completed, includes video_url (direct MP4 link, valid for 24 hours) and duration_actual.
List your recent video generation jobs. Supports pagination with limit and offset parameters. Filter by status. Ordered by creation time descending.
Cancel a pending or processing job. If the job has not started rendering, the cost is refunded to your balance. Jobs already in rendering cannot be cancelled.
Returns your current prepaid balance, total spend, and usage summary for the current billing period.
Detailed usage history with per-job breakdown. Supports date range filtering with start_date and end_date parameters. Useful for cost tracking and audit logs.
Instead of polling for job completion, you can provide a webhook_url in your generation request. When the job completes (or fails), we send an HTTP POST to your URL with the full job object:
{
"event": "video.completed",
"job_id": "job_8f3a...",
"status": "completed",
"video_url": "https://cdn.usvideoapi.com/...",
"duration_actual": 5.0,
"resolution": "720p",
"cost": "$1.25",
"created_at": "2026-04-21T14:30:00Z",
"completed_at": "2026-04-21T14:31:12Z"
}Webhook deliveries include an X-Signature header containing an HMAC-SHA256 signature. Verify this signature using your webhook secret (available in your dashboard) to ensure the payload is authentic and has not been tampered with.
If your webhook endpoint returns a non-2xx status code, we retry delivery up to 3 times with exponential backoff (30s, 120s, 480s).
The API returns standard HTTP status codes with descriptive error messages:
400 Bad Request — Invalid parameters (e.g., duration > 10, missing prompt)401 Unauthorized — Missing or invalid API key402 Payment Required — Insufficient balance for the requested generation404 Not Found — Job ID does not exist or belongs to another account429 Too Many Requests — Rate limit exceeded (see below)500 Internal Server Error — Server-side error; retry with backoff503 Service Unavailable — Temporary capacity constraint; retry after the Retry-After headerAll error responses include a JSON body with error (machine-readable code) and message (human-readable description). Build your error handling around the HTTP status code, not the message text, as messages may change.
Default rate limits are designed to prevent abuse while allowing production-scale workloads:
Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset. If you need higher limits, contact us — enterprise accounts can have limits raised to 50+ concurrent jobs.
For workflows that require generating many videos (e.g., creating product videos for an entire catalog), use the concurrent job limit efficiently:
import asyncio, aiohttp async def generate_video(session, prompt, resolution="720p"): async with session.post( "https://usvideoapi.com/v1/videos", headers={"Authorization": f"Bearer {API_KEY}"}, json={"prompt": prompt, "resolution": resolution, "duration": 5, "webhook_url": WEBHOOK_URL} ) as resp: return await resp.json() async def batch_generate(prompts, max_concurrent=10): sem = asyncio.Semaphore(max_concurrent) async with aiohttp.ClientSession() as session: async def limited(prompt): async with sem: return await generate_video(session, prompt) return await asyncio.gather( *[limited(p) for p in prompts] ) # Generate 100 product videos, 10 at a time prompts = [f"Product showcase: {name}" for name in product_names] jobs = asyncio.run(batch_generate(prompts))
Using webhooks with batch generation is strongly recommended. Instead of polling hundreds of jobs, let the API notify your server when each video is ready.
While the REST API works with any HTTP client in any language, we provide official client libraries for common languages:
pip install usvideoapinpm install @usvideoapi/sdkgo get github.com/usvideoapi/go-sdkAll SDKs handle authentication, polling, retry logic, and webhook signature verification. They are thin wrappers — you are never locked in. The raw REST API is always available.
Full API reference with request/response schemas is available at usvideoapi.com/docs.
Register, get your API key, and make your first call in under 5 minutes.
Get Your API Key →