Skip to main content

GitHub

View source code and contribute

Installation

Swift Package Manager

Add the package dependency in Xcode:
  1. File → Add Package Dependencies
  2. Enter: https://github.com/decartai/decart-ios
  3. Select version and add to your target
Or add to your Package.swift:

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

Initialize the Decart client with your API key:
Parameters:
  • baseURL (optional) - Custom API endpoint (defaults to https://api.decart.ai)
  • apiKey (required) - Your Decart API key from the platform
Store your API key securely. Never commit API keys to version control. Use environment variables or secure storage like Keychain.

Client Tokens

For production iOS and macOS apps using the Realtime API, fetch short-lived client tokens from your backend instead of embedding your permanent API key in the app bundle:
See Client Tokens for details on secure client-side authentication.

Available Models

Import models from the SDK to use with any API:
Each model exposes properties for optimal configuration:

Platform Requirements

The Swift SDK requires:
  • iOS 17.0+ or macOS 12.0+
  • Swift 6.2+
  • Xcode 16.0+
  • A real device for camera access (simulator not supported for WebRTC camera features)

Swift Concurrency

The SDK uses modern Swift concurrency with async/await and AsyncStream for reactive state:

Type Safety

The SDK uses typed input classes for each model, providing compile-time guarantees:

Ready to start building?

Realtime API Guide

Build realtime iOS experiencesCamera handling, video transformation, and interactive applications with WebRTC.

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.