Skip to main content

Hosted Samsar.js & deployment adapters

Use Samsar.js with the hosted Samsar API as the starting point for media, workflows, search and delivery. When you operate a standalone installation, the same workflows can use supported local provider adapters. Native inference and custom model endpoints can take precedence where their model contract requires it.

Choose your path​

PathWhat you configureWhere work runsStart here
Hosted StudioSamsar accountManaged Samsar servicesOpen Studio
Hosted API with Samsar.jsSamsar API key in your server environmentManaged Samsar services and their upstream providersSDK quick start
Standalone with Samsar.js adapterLocal Samsar installation + SAMSAR_API_KEYLocal orchestration; supported generation calls use hosted SamsarExternal requests
Standalone with native/provider adaptersLocal installation + the supported provider credentialsLocal orchestration; model calls use configured providersModel matrix
Custom model endpointCompatible endpoint, authorization and model configurationYour model endpoint and local Samsar orchestrationCustom image utility

Calling the hosted API and selecting the Samsar adapter inside a standalone deployment are two different uses of Samsar.js. The SDK is a client; it does not deploy a model or turn provider credentials into a running service.

Start with hosted Samsar.js​

npm install samsar-js
import SamsarClient from 'samsar-js';

const samsar = new SamsarClient({ apiKey: process.env.SAMSAR_API_KEY });
const job = await samsar.createVideoFromText({
prompt: 'A calm travel film about a morning beside the sea.',
image_model: 'GPTIMAGE2.5',
video_model: 'RUNWAYML',
duration: 30,
aspect_ratio: '16:9',
tts_model: 'OPENAI',
backingtrack_model: 'LYRIA3',
});
// Save this ID. Generation continues asynchronously.
const requestId = job.data.request_id;
const status = await samsar.getStatus(requestId);
console.log(status.data);

The default base URL is https://api.samsar.one/v1. Keep the key on your server. Poll according to the Video API, or pass a webhook where supported. Hosted charges use Samsar credits; pricing and response credit headers describe billing.

Use the same SDK against a standalone processor
const local = new SamsarClient({
apiKey: process.env.SAMSAR_LOCAL_API_KEY,
baseUrl: 'http://localhost:3002/v1',
});
const available = await local.getSupportedTextToVideoModels();
console.log(available.data);

Use a key accepted by that local processor. Changing baseUrl changes the API host; it does not configure provider credentials. Add those in the setup wizard on the standalone installation.

Expand into supported adapters​

Open Providers in the setup wizard. The Samsar API key appears first, followed by optional Inference, GMICloud, and Media provider groups. Each provider has a model tooltip and a link to obtain credentials. Continue is highlighted when the entered combination covers the required capabilities; credential validation then determines availability.

Understand ordering and fallback​

The documentation begins with hosted Samsar.js. A standalone runtime still uses its validated provider configuration and saved preferences. Native inference may lead a model’s chain; optional media adapters can be reordered where the settings expose that model.

  1. Setup writes runtime/config/available-models.json from validated providers.
  2. Settings → Model Adapters lets a standalone administrator reorder available inference, text-to-image and image-to-video adapters.
  3. Overrides live in runtime/config/model-adapter-preferences.json; rendering config preserves them.
  4. A definitive failure can advance a supported fallback chain. An asynchronous job already accepted by a provider stays pinned to that provider while polling.

These controls are specific to standalone installations. Hosted routing is managed by Samsar. Adding a provider to the table does not mean it is compatible with every model from that provider.

Model-specific exceptions​

Model or operationWhat to know
Kimi K3Native Kimi first, Samsar alternative; OpenRouter is not in the Kimi chain. Use kimi-k3 in inference requests; KIMIK3 is the setup key.
Qwen inferenceHosted QWEN3.8 uses OpenRouter internally. Native Alibaba Qwen is a Docker option.
Qwen Image 3.0 ProQWENIMAGE3PRO requires the native Alibaba adapter with standard pay-as-you-go credentials. A Token Plan key does not enable this model.
GPTImage 2.6Use stable keys GPTIMAGE2.5 and GPTIMAGE2.5EDIT, now targeting 2.6 Sunburst at High quality. Retired GPTIMAGE2 and GPTIMAGE2EDIT keys are rejected for new requests. Older GenBlaze GPT Image 2 mappings are excluded from these contracts.
Seedance 2.0Provider-billed standalone I2V via fal or the exact validated GenBlaze route; no Samsar adapter in the setup registry.
Seedance 2.5Uses 5, 10 or 15 second 720p scene buckets. Agent/Vidgenie is 60 credits/sec; standard Express is 50. Direct clips use separate model-call pricing.
Kling 4KLINGIMGTOVID4 / KLINGTXTTOVID4: 720p, no native audio, 5–30-second clips in five-second steps. Old 3 Pro/Turbo keys are compatibility aliases for new requests.
GMICloud via GenBlazeOnly exact, credential-validated model/operation mappings are exposed. Approximate model matches do not enable a route.
ElevenLabs speechThe hosted speech contract accepts ELEVENLABS; standalone setup advertises speech through fal. Direct ElevenLabs music has its own adapter.
Local search and recommendationsLocal embedding indexes require OPENAI_API_KEY; URL crawling also requires FIRECRAWL_API_KEY. A Samsar key alone does not satisfy that local implementation. Hosted clients use Samsar.js.

Verify before generating​

Use Express model discovery for video workflow allowlists and the provider capability API for onboarding capabilities. Neither is a live guarantee of every upstream model. Local generated configuration and validated GenBlaze mappings determine what your own deployment can offer.

See the repository provider guide for runtime details and the model matrix to compare compatible choices.

GPT and Claude model choices​

Text inference, vision, and assistant requests support these models at high or xhigh effort:

Samsar modelNative provider modelOpenRouter model
gpt-6-astragpt-6-astraopenai/gpt-6-astra
gpt-6.1-solgpt-6.1-solopenai/gpt-6.1-sol
claude-opus-5.5claude-opus-5-5anthropic/claude-opus-5.5
claude-fable-5.1claude-fable-5-1anthropic/claude-fable-5.1

Use OPENAI_API_KEY for native GPT, ANTHROPIC_API_KEY for native Claude, or OPENROUTER_API_KEY for OpenRouter. Samsar-hosted requests use SAMSAR_API_KEY. Existing defaults remain GPT 6 Astra and high; selecting Sol no longer redirects to Astra. Saved -xhigh model aliases remain accepted.

Production and standalone deployments prefer native Anthropic for Claude text and vision requests when ANTHROPIC_API_KEY is configured. OpenRouter remains the next configured provider when that key is absent; explicit provider selection is preserved. This applies to both Claude models at High and XHigh effort.

For pipeline and narrative calls, set inference_model and effort. For chat calls, set model and reasoning: { effort: "xhigh" } (or "high"). Account, Vidgenie, and Assistant selectors expose both model families and effort levels; standalone installations show only configured models.

Assistant token rates are listed on the pricing page. High and XHigh use the same per-token rates; total charges depend on actual input, cached input, and output usage. Thinking tokens count as output tokens.