Skip to main content

API Docs

Authentication

Header (required)

Authorization: Bearer YOUR_API_KEY

Create and manage API keys in your dashboard. Register for an account and create an API key from account settings here.

CodeReason
400Missing or empty API_KEY header
401Invalid API_KEY

Supported Models

Image Models

NameKey
GPT Image 1GPTIMAGE1
Imagen 4IMAGEN4
SeedreamSEEDREAM
NanoBananaNANOBANANA

Video Models

NameKey
Runway Gen-4 (Default)RUNWAYML
SeeDance I2VSEEDANCEI2V
Hailuo Img2VidHAILUO
Hailuo ProHAILUOPRO
Wani I2VWANI2V
Wani I2V 5BWANI2V5B
Veo3 I2VVEO3I2V
Veo3 I2V FashVEO3I2VFLASH

Pricing

Per-second rates

Model / ItemCredits / secNotes
Default (all other)10Base rate for most video generation models.
Veo3 I2V Flash30Higher-tier accelerated model.
Veo3 I2V60Premium Veo3 model with higher fidelity.

Subscription plan

PlanIncluded credits / moNotes
Creator Plan$49.99 5 000 creditsBilled monthly
Individual credits can also be purchased from the website $10/1000 credits.

Endpoints

POST /create

Creates a new video-generation session.

Request Body Parameters

FieldType & ConstraintsRequiredDefaultDescription
promptstring (≤ 500 characters)YesText prompt that drives image & video generation.
durationnumber seconds (≤ 120)No30Desired video length.
image_modelstring GPTIMAGE1 | IMAGEN4 | SEEDREAMNoGPTIMAGE1Key for the underlying image-generation model.
video_modelstring RUNWAYML | SEEDANCEI2V | HAILUO | HAILUOPRO | WANI2V | WANI2V5BNoRUNWAYMLKey for the video-synthesis engine.
tonestring grounded | cinematicNogroundedOverall stylistic tone of the output.
aspect_ratiostring 9:16 | 16:9No16:9Aspect ratio of the result

Example Request

curl -X POST https://api.samsar.one/v1/video/create \
-H "Authorization: Bearer 74c4bbbee28e7e221330e48c2cdd897acad510" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "An astronaut cat exploring a neon-lit Mars colony",
"duration": 30,
"image_model": "IMAGEN4",
"video_model": "RUNWAYML",
"tone": "grounded",
"aspect_ratio": "16:9"
}
}'

Successful Response

{
"request_id": "vid_1234567890"
}
CodeReason
201Session created
400Validation error
401Authentication error

Failure Response (Example)

{
"message": "Invalid movie prompt."
}

GET /status

Fetches the current state of a generation session.

Query Parameters

ParamTypeRequiredDescription
request_idstringYesIdentifier returned by /create.

Example Request

curl -X GET "https://api.samsar.one/v1/video/status?request_id=vid_1234567890" \
-H "Authorization: Bearer YOUR_API_KEY"

Possible Responses

ScenarioExample PayloadCode
Processing / PendingSee below200
Completed{ "video_link": "https://cdn.samsar.one/videos/vid_1234567890.mp4" }200
Invalid request{ "message": "Missing or invalid session_id." }400
Not found404
Authentication error401
Pending Payload Structure
{
"status": "PENDING",
"details": {
"prompt_generation": "COMPLETED",
"image_generation": "COMPLETED",
"audio_generation": "COMPLETED",
"frame_generation": "INIT",
"video_generation": "INIT",
"ai_video_generation": "PENDING",
"speech_generation": "COMPLETED",
"music_generation": "COMPLETED",
"lip_sync_generation": "INIT",
"sound_effect_generation": "INIT",
"transcript_generation": "INIT"
}
}
Success Payload Structure
{
"status": "COMPLETED",
"url": "https://cdn.samsar.one/videos/vid_1234567890.mp4"
}