Skip to main content
SamsarOne developer platform

Build generative media workflows with one API

Create videos, transform images, run managed inference, and publish results through a consistent, credit-aware API.

Base URLhttps://api.samsar.one/v1Bearer authentication

Choose a workflow

Make your first request

1
Create an API key

Generate a key in Samsar Studio and keep it on your server. Never expose it in browser code.

2
Check express model availability

The video-generation allowlist can vary with the providers configured for a deployment.

List express models available to this deployment
curl "https://api.samsar.one/v1/video/supported_models"
3
Submit work and track usage

Send your key as a bearer token. Asynchronous generation routes return a request ID; poll the documented status route or provide a webhook.

Create a video
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 cinematic product reveal in a quiet gallery.",
"duration": 10,
"aspect_ratio": "16:9",
"image_model": "GPTIMAGE2",
"video_model": "RUNWAYML"
}
}'
Read credit headers

When an endpoint deducts credits, inspect x-credits-charged and x-credits-remaining. See Models & pricing for current rates and billing units.

Pick the right API surface

SurfaceUse it when…Base path
Core APIsOne Samsar account owns and submits the work./v1/video, /v1/image, /v1/chat, /v1/assistant
V2 APIOne client needs a unified surface for internal and external-user actors./v2
External usersYour platform needs per-customer credits, history, and login state./v1/external_users
External requestsA deployment uses Samsar as a managed fallback provider./v2/external
Narrative APIYou want story structure first and media rendering later./v2/external/narrative

Before you ship

  • Keep API keys in server-side secrets.
  • Store every asynchronous request_id before starting a polling loop.
  • Reuse stable client request IDs where an endpoint supports idempotent retries.
  • Query runtime model availability instead of hard-coding a deployment-wide assumption.
  • Treat credit headers as the final billed amount; estimates can change with duration and optional stages.