Documentation Index
Fetch the complete documentation index at: https://na-36-handover-docs-v2-into-docs-v2-dev-20260518.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Gateway selection
| Environment | Gateway | Notes |
|---|---|---|
| Development / testing | dream-gateway.livepeer.cloud | Free, no API key required, unpredictable latency, no SLA |
| Production (managed) | Gateway provider with API key | Authenticated, rate-limited, provider-specific SLA |
| Production (self-hosted) | go-livepeer in broadcaster mode | Full control over pricing, routing, and orchestrator selection. Requires ETH deposit on Arbitrum One. |
Authentication
- API key stored in environment variables or secrets manager, never in source code
- Backend API key used for server-side requests; CORS-enabled key for browser-side
- Key rotation schedule set (90-day recommended)
-
.envfiles excluded from version control via.gitignore - For self-hosted gateways: Ethereum keystore secured, TicketBroker deposit funded
Error handling
-
401handler: log and surface a configuration error; do not retry (the key is wrong) -
422handler: log the full response body to identify the failing field; fix the request shape -
503handler: retry with exponential backoff; cold model load is expected behaviour, not a failure -
429handler: back off and retry after the rate limit window resets -
500handler: retry once; if persistent, check model_id, input dimensions, and file format - Global timeout set on all requests (recommended: 300 seconds for cold model scenarios)
- SDK retry configuration enabled with exponential backoff
Model selection (AI applications)
Warm models respond immediately. Cold models take 30 seconds to 5 minutes to load. Use warm models for latency-sensitive paths:| Pipeline | Warm model |
|---|---|
| text-to-image | SG161222/RealVisXL_V4.0_Lightning |
| image-to-image | timbrooks/instruct-pix2pix |
| audio-to-text | openai/whisper-large-v3 |
| image-to-text | Salesforce/blip-image-captioning-large |
| LLM | meta-llama/Meta-Llama-3.1-8B-Instruct |
model_id values cold-start on every request until an orchestrator warms them. Test custom models under expected load before launch.
Video applications
- Transcoding profiles defined for all target renditions (resolution, bitrate, FPS)
- Webhook endpoint configured and signature verification implemented (
Livepeer-Signatureheader) - Access control policy set on streams and assets (JWT or webhook playback policy)
- Recording enabled if VOD archival is required (
record: trueon stream creation) - Player tested across target browsers (HLS fallback for non-WebRTC environments)
BYOC applications
- Container
/healthendpoint returns{"status": "ok"}under load - Container registered in orchestrator’s
aiModels.jsonwith correctpipeline,model_id, andprice_per_unit - Container handles graceful shutdown on SIGTERM
- Container tested against local orchestrator before registering on mainnet
- GPU memory usage profiled under concurrent session load
Cost estimation
AI inference pricing is orchestrator-set and denominated in wei. Indicative rate for text-to-image: approximately $0.019 per megapixel of output. Illustrative example for text-to-image at 1024x1024:- 1024 x 1024 = 1,048,576 pixels = 1.05 megapixels
- At 0.020 per image
- At 1,000 images/day: approximately $20/day
Monitoring
- Log HTTP status codes for all gateway requests
- Track p50, p95, p99 latency per pipeline
- Alert on sustained
503rate above 5% (warm model unavailability) - Alert on sustained
5xxrate above 1% (inference failures) - For self-hosted gateways: Prometheus metrics enabled (
-metricsflag) and scraped - TicketBroker deposit balance monitored (for self-hosted gateways)
Launch readiness
- Production gateway configured (not
dream-gateway.livepeer.cloud) - API key in secrets manager, not in code
- Retry policy implemented with exponential backoff
- All error types (
401,422,503,429,500) handled - Warm models used for latency-sensitive paths (AI applications)
- Cost projection completed
- Monitoring and alerting configured
- Incident response contact identified: Livepeer Discord
#builders