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',
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, add the credentials for your intended models, and let validation produce the available model list. Start with the Samsar adapter for its supported managed routes; add native inference or other provider adapters as needed.

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.
GPT Image 2.5Keep stable keys GPTIMAGE2 and GPTIMAGE2EDIT. 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. Hosted routing and standalone adapter choices differ.
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.