Getting started
Quickstart
Call the HTTP API directly — there's no SDK to install. Every request needs an API key, which you can generate from the dashboard under Settings → API keys.
# Node (18+, built-in fetch) const res = await fetch("https://xdanil.com/v1/videos", { headers: { Authorization: "Bearer cf_live_••••••••••••" }, }); const { data } = await res.json(); # Python import requests res = requests.get( "https://xdanil.com/v1/videos", headers={"Authorization": "Bearer cf_live_••••••••••••"}, ) page = res.json()
Authentication
Every request is authenticated with a bearer token in the Authorization header. Keys are scoped per environment — use a cf_test_ key while integrating, and switch to cf_live_ once you're ready to process real traffic.
- Keys never expire automatically, but can be rotated or revoked at any time.
- Test-mode uploads are capped at 50 MB and auto-delete after 24 hours.
Core concepts
A video is the top-level object: once created, it moves through processing → ready (or failed). Each video produces one or more renditions — the resolution/bitrate variants that make up its adaptive bitrate ladder.
Uploading video
Uploads accept direct multipart file bodies for files under 2 GB, or a resumable upload session for anything larger. Processing starts automatically once the upload completes — you don't need to trigger it separately.
Adaptive playback
Every processed video gets an HLS and a DASH manifest. Point your player at playback_url — bitrate switching happens automatically on the client based on available bandwidth.
Webhooks
Register an endpoint to receive video.ready, video.failed, and video.deleted events. Payloads are signed with your webhook secret using an HMAC-SHA256 header — verify it before trusting the body.
Signed URLs
For private content, generate a time-limited playback URL scoped to a specific domain. Signed URLs expire after a configurable window (5 minutes to 7 days) and can't be reused past that point.
Errors
Errors return a standard JSON body with error.code and error.message. 4xx codes indicate a problem with the request; 5xx indicates something went wrong on our end — these are safe to retry with backoff.
Rate limits
The default limit is 120 requests/minute per API key. Current usage is returned on every response via X-RateLimit-Remaining. Need a higher ceiling? Reach out from the dashboard.