GitHub
View source code and contribute
Installation
Gradle (JitPack)
Add the JitPack repository to yoursettings.gradle.kts:
settings.gradle.kts
build.gradle.kts:
build.gradle.kts
Quick Start
What can you build?
The SDK provides two main APIs for different use cases:Realtime API
Realtime video streams via WebRTC
Queue API
Batch video processing
Platform Requirements
The Android SDK requires:
- Android API 24+ (Android 7.0 Nougat)
- Kotlin 2.1+
- Java 17
- A real device for camera access (emulator does not support WebRTC camera features)
Client Setup
Initialize the Decart client with your API key and an AndroidContext:
apiKey(required) - Your Decart API key from the platformbaseUrl(optional) - Custom WebSocket endpoint for the Realtime APIhttpBaseUrl(optional) - Custom HTTP endpoint for the Queue APIlogLevel(optional) - Minimum log level:VERBOSE,DEBUG,INFO,WARN,ERROR,NONE
Client Tokens
For production Android apps using the Realtime API, fetch short-lived client tokens from your backend instead of embedding your permanent API key in the APK:Available Models
Realtime Models
Use these withclient.realtime.connect():
Batch Video Models
Use these withclient.queue.submit() or client.queue.submitAndPoll():
Previous generation models
Previous generation models
Kotlin Coroutines & Flow
The SDK uses Kotlin coroutines and Flow for reactive state management:Jetpack Compose Integration
The SDK works with Jetpack Compose through WebRTC’sSurfaceViewRenderer:
Android Permissions
Your app must declare camera and internet permissions. Add these to yourAndroidManifest.xml:
Type Safety
The SDK uses typed input classes for each batch video model category, providing compile-time guarantees:Error Handling
The SDK provides two error mechanisms — one for realtime, one for queue: Realtime errors are emitted via theerrors SharedFlow:
Sample App
The SDK includes a sample Jetpack Compose app with:- Realtime tab — Camera capture + WebRTC streaming with live prompt changes
- Video tab — Batch job submission, status updates, and result playback
Ready to start building?
Realtime API Guide
Build realtime Android experiencesComplete guide with Jetpack Compose examples for camera handling, video transformation, and interactive applications.
Queue API Guide
Batch video processingEdit videos, control motion, and transform videos with typed input classes and Flow-based progress tracking.