Documentation Index
Fetch the complete documentation index at: https://docs.samuraiapi.in/llms.txt
Use this file to discover all available pages before exploring further.
Video Generation
Create high-quality videos from text prompts using state-of-the-art video generation models. This is an asynchronous endpoint that returns a job ID for status polling.Endpoint
Request Body
The model ID to use for video generation.Available models include:
veo-3.1(Google’s latest)sora-2(OpenAI’s latest)luma-ray-2(Luma AI’s latest)hailuo-2(MiniMax’s latest)pika-2.2(Pika Labs’ latest)kling-v1.5(Kuaishou’s latest)
A text description of the desired video. The maximum length is 1000 characters.
The aspect ratio of the generated video. Options:
16:9, 9:16, 1:1.The duration of the generated video in seconds. Options:
5, 10.A unique identifier for the end-user, for abuse monitoring.
Response
Unique identifier for the generation job (e.g.,
vid-abc123)Current status of the job. Always
"pending" initially.The URL to poll for the job status.
Polling for Status
Since video generation is an asynchronous process, you must poll the status endpoint until the job is completed.Endpoint
Response
Unique identifier for the generation job
Current status of the job. One of:
"pending", "processing", "completed", "failed".The result of the generation job (only present when
status is "completed").video_url(string): The URL of the generated videothumbnail_url(string): The URL of the video thumbnail
Error details (only present when
status is "failed").message(string): Description of the error
Examples
Generate Video
Error Responses
| Status | Error Type | Description |
|---|---|---|
| 400 | invalid_request_error | Missing required field or invalid parameter |
| 401 | authentication_error | Invalid API key |
| 404 | not_found_error | Model not found |
| 429 | rate_limit_error | Rate limit exceeded |
| 500 | server_error | Internal server error |