Video API
- Base URL:
https://api.samsar.one/v1 - Auth:
Authorization: Bearer <API_KEY> - Content-Type:
application/json - Webhooks are optional; otherwise poll
GET /status?request_id=.... - Credits are charged when a request is accepted; where available, responses include
x-credits-chargedandx-credits-remaining.
Pricing
Credits are charged when a request is accepted. Standard /video/text_to_video and /video/image_list_to_video express models are billed per rendered second by model. Image-list add_narrator_avatar adds an optional 4 credits/sec avatar generation stage, and image-list express_cta_generation adds an optional 1 credit/sec CTA text-generation stage. Video model keys outside the documented supported values are not supported as default route model values. /video/translate_video and /video/join_videos are billed at a flat 3 credits/sec based on the source/joined video duration. /video/add_outro_image, /video/update_outro_image, /video/update_footer_image, /external_users/add_outro_image, /external_users/update_outro_image, and /external_users/update_footer_image are billed at a flat 75 credits/request. /video/clone and /v2/video/clone do not charge additional credits.
video_model | Text-to-video credits/sec | Unit options (seconds) |
|---|---|---|
VEO3.1I2V | 60 | 6, 8 |
VEO3.1I2VFAST | 36 | 6, 8 |
SEEDANCEI2V (Seedance 1.5) | 30 | 5, 10 |
KLINGIMGTOVID3PRO | 36 | 5, 10 |
HAPPYHORSEI2V | 36 | 5, 10, 15 |
RUNWAYML | 30 | 5, 10 |
For each listed standard model, the per-second price is split into these components:
| Component | Credits/sec |
|---|---|
| Pipeline | 4 |
| Inference | 4 |
| Image Gen / Edit | 2 |
| Speech | 2 |
| Music | 2 |
| Effects and lipsync | 2 |
| Video | Remainder by model |
That gives this per-model distribution:
video_model | Pipeline | Inference | Image Gen / Edit | Speech | Music | Effects and lipsync | Video | Total |
|---|---|---|---|---|---|---|---|---|
VEO3.1I2V | 4 | 4 | 2 | 2 | 2 | 2 | 44 | 60 |
VEO3.1I2VFAST | 4 | 4 | 2 | 2 | 2 | 2 | 20 | 36 |
SEEDANCEI2V | 4 | 4 | 2 | 2 | 2 | 2 | 14 | 30 |
KLINGIMGTOVID3PRO | 4 | 4 | 2 | 2 | 2 | 2 | 20 | 36 |
HAPPYHORSEI2V | 4 | 4 | 2 | 2 | 2 | 2 | 20 | 36 |
RUNWAYML | 4 | 4 | 2 | 2 | 2 | 2 | 14 | 30 |
Text-to-video formula
credits = duration_seconds × model_rate
Image list to video formula
credits = duration_seconds × model_rate, using the same model rates as the text-to-video table above. Add duration_seconds × 4 when add_narrator_avatar is true and duration_seconds × 1 when express_cta_generation is true.
Translate video formula
credits = duration_seconds × 3
Join videos formula
credits = duration_seconds × 3
Clone video
POST /video/clone and POST /v2/video/clone currently do not charge additional credits.
Add outro image formula
credits = 75
Update outro image formula
credits = 75
Update footer image formula
credits = 75
Remove subtitles
POST /video/remove_subtitles currently does not charge additional credits.
Add subtitles
POST /video/add_subtitles currently does not charge additional credits.
Cancel render
POST /video/cancel_render currently does not charge additional credits.
Example: a 10-second RUNWAYML text-to-video render costs 300 credits.
GET /video/supported_models
Fetch the currently supported image_model and video_model keys for POST /video/text_to_video.
Request
curl "https://api.samsar.one/v1/video/supported_models"
Success response (200)
{
"IMAGE_MODELS": [
{ "label": "GPTIMAGE2", "value": "GPTIMAGE2", "basePrice": 46 },
{ "label": "NANOBANANA2", "value": "NANOBANANA2", "basePrice": 23 },
{ "label": "SEEDREAM", "value": "SEEDREAM", "basePrice": 15 },
{ "label": "CUSTOM_TEXT_TO_IMAGE", "value": "CUSTOM_TEXT_TO_IMAGE", "basePrice": 10 }
],
"VIDEO_MODELS": [
{
"label": "VEO3.1I2V",
"value": "VEO3.1I2V",
"basePrice": 60,
"pricingDistribution": {
"pipeline": 4,
"inference": 4,
"image_gen_edit": 2,
"speech": 2,
"music": 2,
"effects_and_lipsync": 2,
"video": 44,
"total": 60,
"optionalAddons": {
"express_cta_generation": 1
}
}
},
{
"label": "VEO3.1I2VFAST",
"value": "VEO3.1I2VFAST",
"basePrice": 36,
"pricingDistribution": {
"pipeline": 4,
"inference": 4,
"image_gen_edit": 2,
"speech": 2,
"music": 2,
"effects_and_lipsync": 2,
"video": 20,
"total": 36,
"optionalAddons": {
"express_cta_generation": 1
}
}
},
{
"label": "Seedance 1.5",
"value": "SEEDANCEI2V",
"basePrice": 30,
"pricingDistribution": {
"pipeline": 4,
"inference": 4,
"image_gen_edit": 2,
"speech": 2,
"music": 2,
"effects_and_lipsync": 2,
"video": 14,
"total": 30,
"optionalAddons": {
"express_cta_generation": 1
}
}
},
{
"label": "KLINGIMGTOVID3PRO",
"value": "KLINGIMGTOVID3PRO",
"basePrice": 36,
"pricingDistribution": {
"pipeline": 4,
"inference": 4,
"image_gen_edit": 2,
"speech": 2,
"music": 2,
"effects_and_lipsync": 2,
"video": 20,
"total": 36,
"optionalAddons": {
"express_cta_generation": 1
}
}
},
{
"label": "Happy Horse 1.0 I2V",
"value": "HAPPYHORSEI2V",
"basePrice": 36,
"pricingDistribution": {
"pipeline": 4,
"inference": 4,
"image_gen_edit": 2,
"speech": 2,
"music": 2,
"effects_and_lipsync": 2,
"video": 20,
"total": 36,
"optionalAddons": {
"express_cta_generation": 1
}
}
},
{
"label": "RunwayML Gen 4.5",
"value": "RUNWAYML",
"basePrice": 30,
"pricingDistribution": {
"pipeline": 4,
"inference": 4,
"image_gen_edit": 2,
"speech": 2,
"music": 2,
"effects_and_lipsync": 2,
"video": 14,
"total": 30,
"optionalAddons": {
"express_cta_generation": 1
}
}
}
]
}
IMAGE_MODELSandVIDEO_MODELSare generated from the server-side text-to-video allowlist.- Each standard priced item includes
label(display text),value(request key),basePrice(lowest configured per-unit price for that model), andpricingDistributionin credits/sec.pricingDistribution.optionalAddons.express_cta_generationis the image-list express CTA surcharge in credits/sec. Custom image-to-video adapters are configured through the top-level custom model configuration, not as a standardVIDEO_MODELSitem. - Use each item’s
valuedirectly asimage_modelandvideo_modelinPOST /video/text_to_video. - This endpoint does not require authentication.
POST /video/text_to_video
Submit a prompt-only request to start video generation. Webhooks are optional.
Request body
{
"input": {
"prompt": "Required text, max 1000 chars",
"image_model": "GPTIMAGE2 | NANOBANANA2 | SEEDREAM | CUSTOM_TEXT_TO_IMAGE",
"video_model": "VEO3.1I2V | VEO3.1I2VFAST | SEEDANCEI2V | KLINGIMGTOVID3PRO | HAPPYHORSEI2V | RUNWAYML",
"duration": 30,
"tone": "grounded | cinematic",
"aspect_ratio": "16:9 | 9:16",
"language": "auto | en | es | fr | de | pt | it | nl | sv | hi | ar | ru | ja | ko | th | zh",
"enable_subtitles": true,
"font_key": "Poppins",
"outro_image_url": "https://cdn.example.com/outro.png",
"generate_outro_image": false,
"cta_url": "https://example.com/book",
"cta_text_top": "Scan to book",
"cta_text_bottom": "Limited availability",
"cta_logo": "https://cdn.example.com/logo-white.png",
"add_footer_animation": true,
"footer_metadata": [
{ "url": "https://example.com/book", "title": "Book now" }
]
},
"webhookUrl": "https://example.com/webhook"
}
prompt,image_model,video_model,durationare required;duration≤ 240 seconds.languageis optional; passauto(default) or one of the listed language codes.enable_subtitlesoptional; defaults totrue. Set tofalseto skip subtitle generation entirely.font_keyoptional; must be supported for the chosenlanguage. It sets both subtitle and speaker fonts. UseGET /supported_fontsor /fonts to preview choices.- Provided outro image mode: set
outro_image_urlto append a custom outro frame.add_outro_animationis optional; when true, it applies a fade overlay during the outro.add_outro_focus_arearequiresadd_outro_animation: trueand a validoutro_focust_area. - Generated outro image mode: set
generate_outro_image: trueand providecta_url. Samsar creates a QR-code outro image server-side fromcta_url, optionalcta_text_top, optionalcta_text_bottom, and optionalcta_logo. This mode automatically enablesadd_outro_animation,add_outro_focus_area, and computesoutro_focust_area. - Footer QR mode: set
add_footer_animation: trueand providefooter_metadatawith{ "url", "title" }items. A single item is applied to every generated scene; multiple items map by generated scene index. The frame processor renders the bottom CTA section only on layers where this option is enabled. - Use only one outro mode in a request. If
generate_outro_imageis true, omitoutro_image_url,add_outro_animation,add_outro_focus_area, andoutro_focust_areabecause Samsar derives those values. outro_focust_area/outro_focus_areavalues are{ x, y, width, height }within the output canvas (16:9is1792x1024,9:16is1024x1792).- Request bodies can be nested under
input(recommended) or sent as a flat JSON payload.
Sample request
curl -X POST https://api.samsar.one/v1/video/text_to_video \
-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": "GPTIMAGE2",
"video_model": "RUNWAYML",
"tone": "grounded",
"aspect_ratio": "16:9",
"language": "en",
"enable_subtitles": true,
"font_key": "Poppins",
"generate_outro_image": true,
"cta_url": "https://example.com/tour",
"cta_text_top": "Scan for the tour",
"cta_text_bottom": "Book a demo",
"add_footer_animation": true,
"footer_metadata": [
{ "url": "https://example.com/tour", "title": "Book a demo" }
]
}
}'
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
POST /video/image_list_to_video
Create a video from an ordered list of images. Samsar builds a narrative from the images and optional metadata, then renders the video using VEO3.1I2V, VEO3.1I2VFAST, SEEDANCEI2V, KLINGIMGTOVID3PRO, HAPPYHORSEI2V, or RUNWAYML. If video_model is omitted, it defaults to RUNWAYML.
Request body
{
"input": {
"image_urls": [
"https://cdn.example.com/frame1.png",
"https://cdn.example.com/frame2.png"
],
"prompt": "Optional high-level direction",
"metadata": { "project": "launch_trailer" },
"video_model": "VEO3.1I2V | VEO3.1I2VFAST | SEEDANCEI2V | KLINGIMGTOVID3PRO | HAPPYHORSEI2V | RUNWAYML",
"aspect_ratio": "16:9 | 9:16",
"language": "auto | en | es | fr | de | pt | it | nl | sv | hi | ar | ru | ja | ko | th | zh",
"enable_subtitles": true,
"font_key": "Poppins",
"limit_single_narrator": false,
"add_narrator_avatar": false,
"generate_outro_image": false,
"express_cta_generation": false,
"cta_url": "https://example.com/book",
"cta_text_top": "Scan to book",
"cta_text_bottom": "Limited availability",
"cta_logo": "https://cdn.example.com/logo-white.png",
"add_footer_animation": false,
"footer_metadata": [
{ "url": "https://example.com/blue-lagoon", "title": "Blue Lagoon Tour" }
]
},
"webhookUrl": "https://example.com/webhook"
}
image_urlsrequired; non-empty array of URL strings or objects containingimage_url,imageUrl,url,src,enhanced_url, orenhancedUrl. Object entries may also includetitle,image_text,activity_title,name, orlabelfor narration context.metadataoptional plain object forwarded into the narrative builder.promptoptional text used to guide pacing/tone.video_modeloptional; supported values areVEO3.1I2V,VEO3.1I2VFAST,SEEDANCEI2V,KLINGIMGTOVID3PRO,HAPPYHORSEI2V, andRUNWAYML. Defaults toRUNWAYML.aspect_ratiooptional; supports16:9and9:16. Omitted or unsupported values fall back to16:9.languageoptional; defaults toautofor detection.enable_subtitlesoptional; defaults totrue. Set tofalseto skip subtitle generation entirely.font_keyoptional; must be supported for the chosenlanguage. It sets both subtitle and speaker fonts.limit_single_narratoroptional boolean; defaults tofalse. When true, Samsar keeps all narration under one narrator identity.add_narrator_avataroptional boolean; defaults tofalse. When true, Samsar automatically enableslimit_single_narrator, generates an influencer-style human narrator avatar suitable for the image-list narrative, and overlays the avatar video bottom-center or centered in the footer row when footer metadata is present.- Provided outro image mode: set
outro_image_urlto append a custom outro frame.add_outro_animationis optional; when true, it applies a fade-to-black overlay during the outro.add_outro_focus_arearequiresadd_outro_animation: trueand a validoutro_focust_area. - Generated outro image mode: set
generate_outro_image: trueand providecta_url. Samsar creates a QR-code outro image server-side from the input images,cta_url, optionalcta_text_top, optionalcta_text_bottom, and optionalcta_logo. This mode automatically enablesadd_outro_animation,add_outro_focus_area, and computesoutro_focust_area. - Footer QR mode: set
add_footer_animation: trueand providefooter_metadatawith one{ "url", "title" }item per image scene. Samsar generates one QR image per scene in the frame processor and renders a footer section on every frame with the title on the left and QR code on the right. - Express CTA generation mode: set
express_cta_generation: truewith onecta_urland omitcta_text_top,cta_text_bottom, andfooter_metadata. Samsar generates concise per-scene footer CTA titles from the image scene payload and clean outro CTA text from the session context, then normalizes the request into the same generated-outro and footer payload shape before rendering. Compatibility aliases includeexpressCtaGeneration,auto_generate_cta_text,autoGenerateCtaText,generate_cta_texts, andgenerateCtaTexts. - Use only one outro mode in a request. If
generate_outro_imageorexpress_cta_generationis true, omitoutro_image_url,add_outro_animation,add_outro_focus_area, andoutro_focust_areabecause Samsar derives those values. outro_focust_area/outro_focus_areavalues are{ x, y, width, height }within the output canvas (16:9is1792x1024,9:16is1024x1792).- Credits for standard express models are billed using the render duration that results from the provided images/metadata:
VEO3.1I2Vis 60 credits/sec,VEO3.1I2VFASTis 36 credits/sec,SEEDANCEI2Vis 30 credits/sec,KLINGIMGTOVID3PROis 36 credits/sec,HAPPYHORSEI2Vis 36 credits/sec, andRUNWAYMLis 30 credits/sec. Narrator avatar generation adds 4 credits/sec whenadd_narrator_avataris true. Express CTA generation adds 1 credit/sec whenexpress_cta_generationis true.
Sample request: provided outro image
curl -X POST https://api.samsar.one/v1/video/image_list_to_video \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"image_urls": [
"https://cdn.example.com/frame1.png",
"https://cdn.example.com/frame2.png"
],
"prompt": "Make this feel like a fast-paced teaser",
"metadata": { "project": "launch_trailer" },
"video_model": "KLINGIMGTOVID3PRO",
"aspect_ratio": "16:9",
"language": "en",
"enable_subtitles": true,
"font_key": "Poppins",
"limit_single_narrator": true,
"outro_image_url": "https://cdn.example.com/outro.png",
"add_outro_animation": true,
"add_outro_focus_area": true,
"outro_focust_area": { "x": 240, "y": 140, "width": 720, "height": 420 }
},
"webhookUrl": "https://example.com/video-webhook"
}'
Sample request: generate QR outro image server-side
curl -X POST https://api.samsar.one/v1/video/image_list_to_video \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"image_urls": [
{ "image_url": "https://cdn.example.com/frame1.png", "title": "Blue Lagoon Tour" },
{ "image_url": "https://cdn.example.com/frame2.png", "title": "Sunset Dinner" }
],
"prompt": "Travel offer reel with a scannable booking outro",
"metadata": { "project": "destination_campaign" },
"video_model": "RUNWAYML",
"aspect_ratio": "9:16",
"language": "en",
"enable_subtitles": true,
"font_key": "Poppins",
"add_narrator_avatar": true,
"generate_outro_image": true,
"cta_url": "https://example.com/book",
"cta_text_top": "Scan to book",
"cta_text_bottom": "Limited availability",
"cta_logo": "https://cdn.example.com/logo-white.png",
"add_footer_animation": true,
"footer_metadata": [
{ "url": "https://example.com/blue-lagoon", "title": "Blue Lagoon Tour" },
{ "url": "https://example.com/sunset-dinner", "title": "Sunset Dinner" }
]
},
"webhookUrl": "https://example.com/video-webhook"
}'
Sample request: express CTA generation from one link
curl -X POST https://api.samsar.one/v1/video/image_list_to_video \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"image_urls": [
{ "image_url": "https://cdn.example.com/frame1.png", "title": "Blue Lagoon Tour" },
{ "image_url": "https://cdn.example.com/frame2.png", "title": "Sunset Dinner" }
],
"prompt": "Travel offer reel with concise scene CTAs",
"metadata": { "brand": "Guidestination", "offer": "Bookable Bangkok experiences" },
"video_model": "RUNWAYML",
"aspect_ratio": "9:16",
"language": "en",
"enable_subtitles": true,
"font_key": "Poppins",
"express_cta_generation": true,
"cta_url": "https://example.com/book"
},
"webhookUrl": "https://example.com/video-webhook"
}'
Success response (200)
{
"request_id": "vid_img_a1b2c3",
"session_id": "vid_img_a1b2c3"
}
Error responses
400invalid or missingimage_urls.401invalid API key.
POST /external_users/text_to_video and /external_users/image_list_to_video
External-user video creation routes accept the same input parameters as /video/text_to_video and /video/image_list_to_video, including generated QR outros (generate_outro_image, cta_url, CTA text/logo fields), image-list express CTA generation (express_cta_generation with cta_url), provided outro images, footer QR sections (add_footer_animation, footer_metadata), subtitle/font options, and image-list video_model / aspect_ratio, limit_single_narrator, and add_narrator_avatar.
Wrap the request with an external_user object. Responses return an external request/session id; either the returned extreq_... id or the normalized external id can be used with /external_users/status, /external_users/add_outro_image, /external_users/update_outro_image, /external_users/update_footer_image, /external_users/translate_video, and /external_users/join_videos.
External user records store a stable unique_key. If unique_key is not provided, Samsar uses external_user_id as the key. V2 clients can create and later reference an external user through POST /v2/user/create_external_user.
Repeated video routes also perform server-side compatibility routing. If a main /video/* route receives an external request id, normalized external id, or external-owned upstream session id, it is processed through the external-user billing path. If an /external_users/* route receives a normal internal GlobalSession/video session id owned by the authenticated account and no external user context is supplied, it is processed through the internal billing path.
{
"external_user": {
"provider": "guidestination",
"unique_key": "traveler_123",
"external_user_id": "traveler_123"
},
"input": {
"image_urls": [
{ "image_url": "https://cdn.example.com/frame1.png", "title": "Blue Lagoon Tour" }
],
"video_model": "RUNWAYML",
"generate_outro_image": true,
"cta_url": "https://example.com/book",
"add_footer_animation": true,
"footer_metadata": [
{ "url": "https://example.com/book", "title": "Book now" }
]
},
"webhookUrl": "https://example.com/webhook"
}
POST /video/add_outro_image
Clone an existing session, then add or replace the outro image in the cloned session and queue frame/video generation.
Request body
{
"input": {
"videoSessionId": "vid_a1b2c3d4",
"outro_image_url": "https://cdn.example.com/outro.png",
"add_outro_animation": true,
"add_outro_focus_area": true,
"outro_focust_area": { "x": 240, "y": 140, "width": 720, "height": 420 }
},
"webhookUrl": "https://example.com/webhook"
}
videoSessionIdrequired; must belong to the API key.outro_image_urlrequired; URL (or data URL) for the outro image.add_outro_animationoptional boolean; when true, adds a fade-to-black overlay in the final outro layer.add_outro_focus_areaoptional boolean; requiresadd_outro_animationand validoutro_focust_area.outro_focust_areaoptional;{ x, y, width, height }, validated against the session canvas.- Behavior:
- If the last layer is already the outro, it replaces that outro.
- If the last layer is not an outro, it appends a new outro layer.
- In both cases, a
0.5sfade-in transition of the outro image is applied to the end of the prior layer so it leads into the outro start frame.
- Credits are billed at 75 credits per request.
Sample request
curl -X POST https://api.samsar.one/v1/video/add_outro_image \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"videoSessionId": "vid_a1b2c3d4",
"outro_image_url": "https://cdn.example.com/outro.png",
"add_outro_animation": true,
"add_outro_focus_area": true,
"outro_focust_area": { "x": 240, "y": 140, "width": 720, "height": 420 }
},
"webhookUrl": "https://example.com/video-webhook"
}'
Success response (200)
{
"request_id": "vid_outro_a1b2c3",
"session_id": "vid_outro_a1b2c3"
}
Error responses
400invalid or missing fields.401invalid API key.402insufficient credits.404session not found.
POST /video/update_outro_image
Clone an existing session that already has an outro layer, update that outro layer, and queue only the frame/video regeneration stages. This route does not rerun prompt, image, speech, music, or AI video generation.
Use one of two modes:
- Provided outro image mode: pass
outro_image_url(oroutroImageUrl,new_outro_image_url,newOutroImageUrl) as an HTTP(S) URL or image data URL. - Generated CTA outro mode: pass
generate_outro_image: truewithcta_url, or providecta_urlwithout anoutro_image_url. Samsar builds a QR-code outro from the existing session image layers, places the QR focus crop and optional CTA text above the fade overlay, and derives the focus area server-side.
Provided outro image request body
{
"input": {
"videoSessionId": "vid_a1b2c3d4",
"outro_image_url": "https://cdn.example.com/outro.png",
"add_outro_animation": true,
"add_outro_focus_area": true,
"outro_focust_area": { "x": 240, "y": 140, "width": 720, "height": 420 }
},
"webhookUrl": "https://example.com/webhook"
}
Generated CTA outro request body
{
"input": {
"videoSessionId": "vid_a1b2c3d4",
"generate_outro_image": true,
"cta_url": "https://example.com/book",
"cta_text_top": "Scan to book",
"cta_text_bottom": "Limited availability",
"add_outro_animation": true
},
"webhookUrl": "https://example.com/webhook"
}
videoSessionIdrequired; must belong to the API key.outro_image_urlrequired unlessgenerate_outro_imageis true.generate_outro_imageoptional boolean; when true,cta_urlis required andoutro_image_urlmust be omitted. Ifcta_urlis provided withoutoutro_image_url, generated CTA outro mode is inferred.cta_urlrequired for generated CTA outro mode; must be HTTP(S). It is converted into a scannable QR code.cta_text_topoptional; rendered near the top of the outro layer above the fade overlay.cta_text_bottomoptional; rendered near the bottom of the outro layer above the fade overlay.cta_logooptional and accepted for compatibility with generated-outro requests.add_outro_animationoptional boolean. In generated CTA outro mode it defaults to true; when true, Samsar adds a black overlay that fades from 60% opacity to 0% while the QR focus crop and CTA text stay above it.add_outro_focus_areaoptional for provided outro image mode; requiresadd_outro_animationand validoutro_focust_area. Generated CTA outro mode calculates the focus area server-side.- Credits are billed at 75 credits per request.
Sample request: update with generated CTA outro
curl -X POST https://api.samsar.one/v1/video/update_outro_image \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"videoSessionId": "vid_a1b2c3d4",
"generate_outro_image": true,
"cta_url": "https://example.com/book",
"cta_text_top": "Scan to book",
"cta_text_bottom": "Limited availability"
},
"webhookUrl": "https://example.com/video-webhook"
}'
Success response (200)
{
"request_id": "vid_outro_update_a1b2c3",
"session_id": "vid_outro_update_a1b2c3"
}
POST /video/update_footer_image
Clone an existing video session, update or remove the scene footer CTA, and queue only footer image creation when needed plus frame/video regeneration. This route does not rerun prompt, image, speech, music, or AI video generation.
Use remove_footer: true to remove the footer from all scenes in the cloned rerender. Otherwise provide at least one CTA field and Samsar applies the same minimal footer layout to each scene.
Update footer request body
{
"input": {
"videoSessionId": "vid_a1b2c3d4",
"cta_text": "Scan to book",
"cta_logo": "https://cdn.example.com/logo-white.png",
"cta_url": "https://example.com/book"
},
"webhookUrl": "https://example.com/webhook"
}
Remove footer request body
{
"input": {
"videoSessionId": "vid_a1b2c3d4",
"remove_footer": true
},
"webhookUrl": "https://example.com/webhook"
}
videoSessionIdrequired; must belong to the API key.remove_footeroptional boolean; defaults to false. When true,cta_text,cta_logo, andcta_urlare ignored and all scene footer metadata is cleared.cta_textoptional string; rendered in the bottom-left footer area.cta_logooptional HTTP(S) URL or image data URL; rendered below the CTA text in the bottom-left footer area.cta_urloptional HTTP(S) URL; converted into a scannable QR code on the right side of the footer.- At least one of
cta_text,cta_logo, orcta_urlis required unlessremove_footeris true. - Credits are billed at 75 credits per request.
Sample request
curl -X POST https://api.samsar.one/v1/video/update_footer_image \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"videoSessionId": "vid_a1b2c3d4",
"cta_text": "Scan to book",
"cta_logo": "https://cdn.example.com/logo-white.png",
"cta_url": "https://example.com/book"
},
"webhookUrl": "https://example.com/video-webhook"
}'
Success response (200)
{
"request_id": "vid_footer_update_a1b2c3",
"session_id": "vid_footer_update_a1b2c3"
}
POST /external_users/add_outro_image
External-user equivalent of /video/add_outro_image. Pass the external user identity and an external request/session id such as extreq_df04419ab0cf426e9b30891da71a9293; Samsar resolves it to the upstream video session, charges the external user's credits, clones the session, and queues only frame/video regeneration.
Request body
{
"external_user": {
"provider": "guidestination",
"external_user_id": "traveler_123"
},
"input": {
"request_id": "extreq_df04419ab0cf426e9b30891da71a9293",
"outro_image_url": "https://cdn.example.com/outro.png",
"add_outro_animation": true,
"add_outro_focus_area": true,
"outro_focust_area": { "x": 240, "y": 140, "width": 720, "height": 420 }
},
"webhookUrl": "https://example.com/webhook"
}
request_id/session_idrequired; use the external request id returned by/external_users/text_to_videoor/external_users/image_list_to_video.outro_image_urlrequired; URL or data URL for the outro image.add_outro_animation,add_outro_focus_area, andoutro_focust_areamatch/video/add_outro_image.- Credits are billed at 75 credits per request against the external user.
POST /external_users/update_outro_image
External-user equivalent of /video/update_outro_image. Use this endpoint when the source video was created through /external_users/text_to_video or /external_users/image_list_to_video; pass either the returned extreq_... id or the normalized external id.
Generated CTA outro request body
{
"external_user": {
"provider": "guidestination",
"external_user_id": "traveler_123"
},
"input": {
"request_id": "extreq_df04419ab0cf426e9b30891da71a9293",
"generate_outro_image": true,
"cta_url": "https://example.com/book",
"cta_text_top": "Scan to book",
"cta_text_bottom": "Limited availability",
"add_outro_animation": true
},
"webhookUrl": "https://example.com/webhook"
}
request_id/session_idrequired; use the external request id returned by an external-user video route.- Supports the same provided-outro and generated CTA outro modes as
/video/update_outro_image. - Generated CTA outro mode derives
add_outro_focus_areaandoutro_focust_areaserver-side. - Credits are billed at 75 credits per request against the external user.
Success response (200)
{
"request_id": "extreq_9b30891da71a9293df04419ab0cf426e",
"session_id": "extreq_9b30891da71a9293df04419ab0cf426e",
"external_request_id": "extreq_9b30891da71a9293df04419ab0cf426e",
"status_endpoint": "/v1/external_users/status?request_id=extreq_9b30891da71a9293df04419ab0cf426e",
"creditsCharged": 75
}
POST /external_users/update_footer_image
External-user equivalent of /video/update_footer_image. Use this endpoint when the source video was created through /external_users/text_to_video or /external_users/image_list_to_video; pass either the returned extreq_... id or the normalized external id.
Request body
{
"external_user": {
"provider": "guidestination",
"external_user_id": "traveler_123"
},
"input": {
"request_id": "extreq_df04419ab0cf426e9b30891da71a9293",
"cta_text": "Scan to book",
"cta_logo": "https://cdn.example.com/logo-white.png",
"cta_url": "https://example.com/book"
},
"webhookUrl": "https://example.com/webhook"
}
request_id/session_idrequired; use the external request id returned by an external-user video route.- Supports the same
remove_footer,cta_text,cta_logo, andcta_urlfields as/video/update_footer_image. - Credits are billed at 75 credits per request against the external user.
Success response (200)
{
"request_id": "extreq_9b30891da71a9293df04419ab0cf426e",
"session_id": "extreq_9b30891da71a9293df04419ab0cf426e",
"external_request_id": "extreq_9b30891da71a9293df04419ab0cf426e",
"status_endpoint": "/v1/external_users/status?request_id=extreq_9b30891da71a9293df04419ab0cf426e",
"creditsCharged": 75
}
POST /video/clone
Deep-copy a completed video session into a new session and queue only the final video render stage. Use this when you need a distinct session id and a distinct rendered video URL, but the same timeline, resources, audio, overlays, subtitle settings, footer/outro metadata, and generated assets.
POST /v2/video/clone exposes the same operation on the V2 route surface.
Request body
{
"input": {
"videoSessionId": "vid_a1b2c3d4"
},
"webhookUrl": "https://example.com/webhook"
}
videoSessionIdrequired; must be a completed video session that belongs to the authenticated user.- The clone copies the source session data and local generated resources into the new session.
- Upstream generation stages are marked complete; only
video_generationis queued so the renderer creates a newvideo/output/video-<new_session_id>_*.mp4file and new CDN URL. - This endpoint currently does not charge additional credits.
Sample request
curl -X POST https://api.samsar.one/v1/video/clone \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"videoSessionId": "vid_a1b2c3d4"
},
"webhookUrl": "https://example.com/video-webhook"
}'
Success response (200)
{
"request_id": "vid_clone_a1b2c3",
"session_id": "vid_clone_a1b2c3",
"status": "PENDING",
"type": "video",
"creditsCharged": 0
}
Poll GET /status?request_id=<new_session_id> or GET /v2/status?request_id=<new_session_id> until the standard video status response returns status: "COMPLETED" with result_url, result_urls, has_subtitles, and result_language.
Error responses
400invalid/missing fields or source session has no completed video URL401invalid API key404session not found
POST /video/translate_video
Translate an existing video session into a new language. This creates a new session and runs only the required stages (speech translation, lip sync, optional transcription, final render) to produce a translated video.
POST /video/retranslate_video is available as an alias for the same operation.
Request body
{
"input": {
"videoSessionId": "vid_a1b2c3d4",
"language": "en | es | fr | ja | th | zh | bn | hi | sa | la",
"enable_subtitles": false,
"translate_outro": true,
"translate_footer": true
},
"webhookUrl": "https://example.com/webhook"
}
videoSessionIdrequired; must be a video session that belongs to the API key.languagerequired; pass a supported language code.enable_subtitlesoptional boolean; defaults tofalse. Whentrue, Samsar generates translated transcript/subtitle text for the cloned session.translate_outrooptional boolean; defaults totrue. When enabled, stored generated-outro top and bottom CTA text are translated and reused in the cloned outro.translate_footeroptional boolean; defaults totrue. When enabled, stored footer CTA text is translated per footer-enabled layer and reused in the cloned footer overlay.outro_image_urlis no longer part of the translate payload. UsePOST /video/update_outro_imagebefore or after translation when the outro image itself needs to change.- Credits are billed at 3 credits/sec using the duration of the source session.
Sample request
curl -X POST https://api.samsar.one/v1/video/translate_video \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"videoSessionId": "vid_a1b2c3d4",
"language": "es",
"enable_subtitles": false,
"translate_outro": true,
"translate_footer": true
},
"webhookUrl": "https://example.com/video-webhook"
}'
Success response (200)
{
"request_id": "vid_tr_a1b2c3",
"session_id": "vid_tr_a1b2c3"
}
Error responses
400invalid/missing fields (unknown session id, unsupported language, etc.)401invalid API key402insufficient credits
POST /video/join_videos
Join multiple completed video sessions into a single session by appending their timelines in order. This creates a new session and queues transcription, frame generation, and final render to produce the joined video.
Request body
{
"input": {
"session_ids": ["vid_a1b2c3d4", "vid_e5f6g7h8"],
"blend_scenes": true
},
"webhookUrl": "https://example.com/webhook"
}
session_idsrequired; array of 2+ unique video session ids.blend_scenesoptional boolean (defaultfalse). Whentrue, joins apply scene-boundary blending: previous outro image is carried into the next scene with a 1s fade-out, and background music layers are adjusted around boundaries (+0.5s) for smoother transitions.- All sessions must belong to the API key, and must have the same
aspect_ratioandframesPerSecond. - Credits are billed at 3 credits/sec using the joined duration (sum of session durations).
Sample request
curl -X POST https://api.samsar.one/v1/video/join_videos \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"session_ids": ["vid_a1b2c3d4", "vid_e5f6g7h8"],
"blend_scenes": true
},
"webhookUrl": "https://example.com/video-webhook"
}'
Success response (200)
{
"request_id": "vid_join_a1b2c3",
"session_id": "vid_join_a1b2c3"
}
Error responses
400invalid/missing fields (unknown session id, incompatible sessions, etc.)401invalid API key402insufficient credits404one or more sessions not found
POST /video/remove_subtitles
Clone an existing session, remove all subtitle/transcript text overlays (type: "text" items in layer activeItemList), and queue only frame + video generation for the new session.
Request body
{
"input": {
"videoSessionId": "vid_a1b2c3d4"
},
"webhookUrl": "https://example.com/webhook"
}
videoSessionIdrequired; must be a video session that belongs to the API key.- Creates a new
session_id; the source session remains unchanged. - The cloned session is configured to skip transcription and other generation stages, and run only frame/video generation.
- This endpoint currently does not charge additional credits.
Sample request
curl -X POST https://api.samsar.one/v1/video/remove_subtitles \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"videoSessionId": "vid_a1b2c3d4"
},
"webhookUrl": "https://example.com/video-webhook"
}'
Success response (200)
{
"request_id": "vid_nosub_a1b2c3",
"session_id": "vid_nosub_a1b2c3"
}
Error responses
400invalid/missing fields (invalid session id format, missing session id, etc.)401invalid API key404session not found
POST /video/add_subtitles
Clone an existing session, add subtitle/transcript text overlays, and queue the stages required to produce a subtitled video in a new session.
Request body
{
"input": {
"videoSessionId": "vid_a1b2c3d4"
},
"webhookUrl": "https://example.com/webhook"
}
videoSessionIdrequired; must be a video session that belongs to the API key.- Creates a new
session_id; the source session remains unchanged. - The cloned session is saved with
has_subtitles: trueand preserves the session language/aspect ratio. - This endpoint currently does not charge additional credits.
Sample request
curl -X POST https://api.samsar.one/v1/video/add_subtitles \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"videoSessionId": "vid_a1b2c3d4"
},
"webhookUrl": "https://example.com/video-webhook"
}'
Success response (200)
{
"request_id": "vid_sub_a1b2c3",
"session_id": "vid_sub_a1b2c3"
}
Error responses
400invalid/missing fields (invalid session id format, missing session id, etc.)401invalid API key404session not found
POST /video/cancel_render
Cancel an in-progress render for an existing session. This sets the session to a cancelled state and stops queued render tasks for that session.
Request body
{
"input": {
"videoSessionId": "vid_a1b2c3d4"
}
}
videoSessionIdrequired; must belong to the API key.- This endpoint does not create a new session.
- This endpoint currently does not charge additional credits.
Sample request
curl -X POST https://api.samsar.one/v1/video/cancel_render \
-H "Authorization: Bearer $SAMSAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"videoSessionId": "vid_a1b2c3d4"
}
}'
Success response (200)
{
"request_id": "vid_a1b2c3d4",
"session_id": "vid_a1b2c3d4",
"status": "CANCELLED",
"cancelled": true,
"message": "Render cancellation requested."
}
Error responses
400invalid/missing session id401invalid API key404session not found
GET /video/fetch_latest_version
Fetch the latest available render URL for a given video session_id.
Request
curl "https://api.samsar.one/v1/video/fetch_latest_version?session_id=vid_a1b2c3d4" \
-H "Authorization: Bearer $SAMSAR_API_KEY"
Completed (200)
{
"session_id": "vid_a1b2c3d4",
"result_url": "https://cdn.samsar.one/videos/vid_a1b2c3d4.mp4",
"has_subtitles": true,
"result_language": "en"
}
has_subtitlesistrue,false, ornullwhen subtitle state is unknown for older sessions.result_languageis the language code saved on the video session.
Pending (202)
{
"session_id": "vid_a1b2c3d4",
"status": "PENDING",
"message": "Render not ready yet."
}
Failed (200)
{
"session_id": "vid_a1b2c3d4",
"status": "FAILED",
"message": "Video generation failed."
}
Cancelled (200)
{
"session_id": "vid_a1b2c3d4",
"status": "CANCELLED",
"message": "Render was cancelled."
}
Error responses
400missing/invalidsession_id401invalid API key403session does not belong to the API key404session not found
GET /video/list_completed_video_sessions
List completed video sessions for the authenticated API key, including each session language and final URL.
Request
curl "https://api.samsar.one/v1/video/list_completed_video_sessions" \
-H "Authorization: Bearer $SAMSAR_API_KEY"
Optional query params:
limit(number): maximum number of sessions to return (server-capped to5000).
Success response (200)
[
{
"session_id": "vid_a1b2c3d4",
"langauge": "en",
"result_language": "en",
"has_subtitles": true,
"result_url": "https://static.samsar.one/video/vid_a1b2c3d4/final.mp4"
},
{
"session_id": "vid_e5f6g7h8",
"langauge": "es",
"result_language": "es",
"has_subtitles": false,
"result_url": "https://static.samsar.one/video/vid_e5f6g7h8/final.mp4"
}
]
- Returns only sessions that have a final video URL available.
langaugeis returned as a normalized language code (lowercase).result_languageis the same normalized language code returned with the corrected field name.has_subtitlesistrue,false, ornullwhen subtitle state is unknown for older sessions.
Error responses
400missing API key/auth header401invalid API key
GET /status
Poll the status for any request_id returned by the video endpoints (or /image/* endpoints).
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",
"expressGenerationStatus": {
"prompt_generation": "PENDING",
"video_generation": "IN_PROGRESS"
}
}
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_urls": [
"https://cdn.samsar.one/videos/vid_a1b2c3d4.mp4"
],
"has_subtitles": true,
"result_language": "en",
"videoLink": "https://cdn.samsar.one/videos/vid_a1b2c3d4.mp4",
"remoteURL": "https://cdn.samsar.one/videos/vid_a1b2c3d4.mp4"
}
result_urlsmay be present when multiple assets are produced;videoLinkorremoteURLcan also contain the download URL.- Completed video responses include
has_subtitlesandresult_languagewhen session metadata is available. expressGenerationStatusis present while individual stages are running;expressGenerationError/messageis present on failure.404is returned when therequest_idis unknown;401when the API key is invalid.
GET /supported_fonts
Fetch the supported subtitle fonts by language code. Use this to validate font_key or text overlay choices before submitting video requests. This endpoint does not require authentication.
Request
curl "https://api.samsar.one/v1/supported_fonts"
Success response (200)
{
"fontsByLanguage": {
"default": ["Rampart One", "Montserrat", "Arial", "sans-serif"],
"en": ["Poppins", "Montserrat", "Arial", "sans-serif"],
"ja": ["Noto Sans JP", "M PLUS Rounded 1c", "Hiragino Sans", "Yu Gothic UI", "sans-serif"],
"ko": ["Noto Sans KR", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "sans-serif"]
}
}
defaultis used when a language code has no explicit mapping.- Font previews: visit
/fontsfor light/dark samples with keys.
V2 API
The /v2 omni routes now live in V2 API, with left-nav sections for authentication, user credits, app keys, media generation, assistant utilities, status, and publishing routes.