Skip to main content

GitHub

View source code and contribute

Installation

Quick Start

The SDK is fully async and uses standard Python async/await patterns:

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
Use async with DecartClient(...) for automatic connection cleanup in production services.

Client Setup

All APIs share the same client initialization:
Parameters:
  • api_key (required) - Your Decart API key from the platform
  • base_url (optional) - Custom API endpoint (defaults to Decart’s production API)
Use the context manager (async with) for automatic cleanup of HTTP connections.

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.

Available Models

Import models from the SDK to use with either API:

Async/Await

All SDK methods are asynchronous and must be called with await. If you’re new to async Python:
  • Use async def for functions that call SDK methods
  • Call async functions with await
  • Run async code with asyncio.run(main())
  • For scripts or notebooks, you can use the sync wrapper pattern shown above

Type Hints Support

The SDK includes full type hints for better IDE support and type checking. 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.