Scope Server API
The Scope Server provides a REST API for pipeline management and a WebRTC API for real-time video streaming. Build custom applications that generate video in real-time using text prompts or input video.What You Can Build
- Text-to-Video streaming - Generate live video from text prompts
- Video-to-Video transformation - Transform input video in real-time
- Custom creative tools - Build VJ software, live performance tools, interactive installations
- Integrations - Connect Scope to your existing applications and workflows
Quick Start
Get streaming video from the Scope API in under 5 minutes. You’ll create anindex.html file that streams real-time generated video using the longlive pipeline.
Configuration
Server Options
Environment Variables
| Variable | Description |
|---|---|
PIPELINE | Default pipeline to pre-warm on startup |
HF_TOKEN | Hugging Face token for downloading models and Cloudflare TURN |
VERBOSE_LOGGING | Enable verbose logging for debugging |
TURN Server Credentials
For WebRTC connections that need to traverse firewalls (NAT traversal), TURN servers are used. The server automatically configures TURN credentials when environment variables are set: Using Cloudflare (via Hugging Face):API Endpoints
Health & Info
| Endpoint | Method | Description |
|---|---|---|
/health | GET | Health check |
/api/v1/hardware/info | GET | Get hardware info (VRAM, Spout availability) |
/docs | GET | Interactive API documentation (Swagger UI) |
Pipeline Management
| Endpoint | Method | Description |
|---|---|---|
/api/v1/pipeline/load | POST | Load a pipeline |
/api/v1/pipeline/status | GET | Get current pipeline status |
/api/v1/pipelines/schemas | GET | Get schemas for all available pipelines |
Model Management
| Endpoint | Method | Description |
|---|---|---|
/api/v1/models/status | GET | Check if models are downloaded for a pipeline |
/api/v1/models/download | POST | Start downloading models for a pipeline |
WebRTC
| Endpoint | Method | Description |
|---|---|---|
/api/v1/webrtc/ice-servers | GET | Get ICE server configuration |
/api/v1/webrtc/offer | POST | Send WebRTC offer, receive answer |
/api/v1/webrtc/offer/{session_id} | PATCH | Add ICE candidates (Trickle ICE) |
Assets
| Endpoint | Method | Description |
|---|---|---|
/api/v1/assets | GET | List available assets (images/videos) |
/api/v1/assets | POST | Upload an asset |
/api/v1/assets/{path} | GET | Serve an asset file |
LoRA
| Endpoint | Method | Description |
|---|---|---|
/api/v1/lora/list | GET | List available LoRA files |
Next Steps
Learn how to use the API for specific workflows:Load Pipeline
Load and configure pipelines with custom parameters, LoRAs, and VAE types
Send Parameters
Update prompts, transitions, and settings in real-time during streaming
Receive Video (T2V)
Set up WebRTC to receive generated video from text prompts
Send & Receive Video (V2V)
Transform input video in real-time with bidirectional WebRTC
VACE
Guide generation with reference images and control videos