Skip to main content

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
If you’re building a browser app and want to avoid exposing API keys, route SDK calls through your backend proxy. See the proxy examples in sdks/sdk/examples/nextjs-proxy and sdks/sdk/examples/express-proxy.

Client Setup

All APIs share the same client initialization:
Parameters:
  • apiKey (required) - Your Decart API key from the platform
  • baseUrl (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:
See Client Tokens for details on secure realtime auth.

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:

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.