api
title: Video API description: Generative video APIs for Business Applications sidebar_position: 1 slug: /video
Video API
- Base URL:
https://api.samsar.one/v1 - Auth:
Authorization: Bearer <API_KEY> - Content-Type:
application/json
Pricing
Credits are charged per rendered second based on the chosen video_model. If image_model is HUNYUAN, the charge is multiplied by 1.5x.
video_model | Credits / sec |
|---|---|
VEO3.1I2VFAST | 30 |
SORA2 | 30 |
VEO3.1I2V | 60 |
KLINGIMGTOVIDTURBO | 15 |
SORA2PRO | 70 |
| All other express models | 10 |
Formula
credits = duration_seconds × credits_per_sec × (image_model === HUNYUAN ? 1.5 : 1)
Example: 45s video on RUNWAYML with SEEDREAM → 45 × 10 = 450 credits.
POST /video/create
Submit a prompt-only request to start video generation. Webhooks are optional.
Request body
{
"input": {
"prompt": "Required text, max 1000 chars",
"image_model": "GPTIMAGE1 | IMAGEN4 | SEEDREAM | HUNYUAN | NANOBANANA",
"video_model": "RUNWAYML | SEEDANCEI2V | HAILUO | HAILUOPRO | WANI2V | WANI2V5B | VEO3.1I2V | VEO3.1I2VFAST | KLINGIMGTOVIDTURBO | SORA2 | SORA2PRO",
"duration": 30,
"tone": "grounded | cinematic",
"aspect_ratio": "16:9 | 9:16",
"video_model_sub_type": "anime | 3d_animation | clay | comic | cyberpunk"
},
"webhookUrl": "https://example.com/webhook"
}
prompt,image_model,video_model,durationare required;duration≤ 240 seconds.video_model_sub_typeis optional and must be one of the listed values when provided.
Sample request
curl -X POST https://api.samsar.one/v1/video/create \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "A timelapse of clouds over a futuristic city at sunrise",
"duration": 30,
"image_model": "IMAGEN4",
"video_model": "RUNWAYML",
"tone": "grounded",
"aspect_ratio": "16:9"
}
}'
Success response (200)
{
"request_id": "vid_a1b2c3d4",
"session_id": "vid_a1b2c3d4"
}
Error responses
400invalid or missing fields (empty prompt, unsupported models, duration > 240, etc.)401invalid API key
GET /status
Poll the status for any request_id returned by /video/create.
Request
curl "https://api.samsar.one/v1/status?request_id=vid_a1b2c3d4" \
-H "Authorization: Bearer $SAMSAR_API_KEY"
Queued / processing
{
"session_id": "vid_a1b2c3d4",
"request_id": "vid_a1b2c3d4",
"status": "PENDING",
"type": "video",
"provider": "RUNWAYML"
}
Completed
{
"session_id": "vid_a1b2c3d4",
"request_id": "vid_a1b2c3d4",
"status": "COMPLETED",
"type": "video",
"provider": "RUNWAYML",
"result_url": "https://cdn.samsar.one/videos/vid_a1b2c3d4.mp4"
}
result_urlsmay be present when multiple assets are produced.404is returned when therequest_idis unknown;401when the API key is invalid.