GitHub
View source code and contribute
Installation
Quick Start
What can you build?
The SDK provides three main APIs for different use cases:Realtime API
Realtime video streams
Queue API
Video processing
Process API
Image editing
Client Setup
All APIs share the same client initialization:apiKey(required) - Your Decart API key from the platformbaseUrl(optional) - Custom API endpoint (defaults to Decart’s production API)telemetry(optional) - Enable SDK telemetry for realtime observability (default:true)
Store your API key in environment variables. Never commit API keys to version control.
Client Tokens
For client-side applications (browsers, mobile apps) using the Realtime API, create short-lived client tokens instead of exposing your permanent API key:Reusable File Uploads
client.files.upload(file) uploads a reference image once and returns a file_… id that you can pass to realtime connect({ initialState: { image } }), set({ image }), or setImage(...) — handy when the same asset is reused across many updates or across reconnects. See Reference Image Uploads on the realtime page.
Available Models
Import models from the SDK to use with either API:Previous generation models
Previous generation models
TypeScript Support
The SDK is written in TypeScript with full type definitions. Each model enforces its own required inputs, so you’ll get autocomplete and helpful errors if something is missing.Ready to start building?
Realtime API Guide
Build realtime experiencesLearn WebRTC integration, camera handling, and how to create interactive video applications.
Queue API Guide
Video processingEdit videos, control motion, and transform videos with style transfer.
Process API Guide
Image editingEdit and transform images on-demand with synchronous processing.