Get content media
/api/v1/content/{content_id}/mediaGenerates a short-lived signed Cloud CDN URL for video or audio playback, or redirects directly to the stream.
Path parameters
Content or exercise video identifier.
Query parameters
Requested video rendition. Ignored for audio assets.
When true, responds with HTTP 302 Found and a Location header pointing to the signed Cloud CDN URL (Cache-Control: private, no-store).
How signed media streaming works
Media assets live on Cloud CDN (https://media.bellacoach.ai) and require a cryptographic signature in query parameters (Expires, KeyName, Signature). Unsigned requests return 403 Forbidden.
Why call this endpoint?
- Quality switching: Exercise steps inside workout bundles fetched via
GET /api/v1/content/workouts/{workout_id}already come pre-signed at720p, so initial playback requires zero extra requests. Call this endpoint with?quality=1080p,540p, or360pwhen a user or adaptive player changes resolution. - Refreshing expired URLs: Every signed URL has a 2-hour TTL (
7200seconds), reported inexpires_at. If a user leaves a session paused pastexpires_atand the player receives403 Forbidden, call this endpoint to mint a fresh signed URL and resume playback. - Standalone exercise playback: Resolve a signed stream URL directly from any exercise video ID.
Delivery patterns
- JSON discovery (
redirect=false, recommended): Your backend calls this endpoint with$BELLA_API_KEYand returns the signedurl,available_qualities, andexpires_atto your client app. - Direct redirect (
redirect=true): Responds withHTTP 302 Found(Location: https://media.bellacoach.ai/...andCache-Control: private, no-store). Useful if your own backend exposes a pass-through media proxy route (e.g.GET /api/media/{content_id}?quality=540p) that redirects<video>,AVPlayer, orExoPlayerdirectly to Cloud CDN.
Cloud CDN playback behaviour
- Cloud CDN supports HTTP byte-range requests (
Range/206 Partial Content) for instant seeking and scrubbing on web and mobile players. - Pass the signed
urlverbatim (keepingExpires,KeyName, andSignatureintact) directly to<video>,AVPlayer, orExoPlayer. - Do not forward your
Authorization: Bearer $BELLA_API_KEYheader tomedia.bellacoach.ai.
Mobile bandwidth adaptation: Default to 720p on Wi-Fi, drop to 540p or 360p on cellular or low-data mode, and reserve 1080p for large-screen playback.
Response attributes (MediaDetail)
Exercise video or media identifier.
Asset media type.
Selected rendition quality (e.g. 720p).
Renditions available for this asset (e.g. ["1080p", "720p", "540p", "360p"]).
Asset duration in seconds.
Short-lived signed Cloud CDN stream URL (https://media.bellacoach.ai/...).
ISO 8601 UTC timestamp when the signed URL expires (2-hour TTL).
Returns
HTTP Status Codes
Signed Cloud CDN stream URL and rendition metadata (redirect=false).
Redirects directly to the signed Cloud CDN URL (redirect=true).
The integration key is missing, invalid, or revoked.
Content ID not found, or "media_not_found" for text-only articles.
Requested quality is not available for this asset.
cURL
curl -X GET "https://api.bellacoach.ai/api/v1/content/kno_d3f2ee150f75624548a42cea/media?quality=720p" \
-H "Authorization: Bearer $BELLA_API_KEY" \
-H "Accept: application/json"Response (200 OK)
{
"content_id": "kno_d3f2ee150f75624548a42cea",
"media_type": "video",
"quality": "720p",
"available_qualities": ["1080p", "720p", "540p", "360p"],
"duration_seconds": 25,
"url": "https://media.bellacoach.ai/content/kno_d3f2ee150f75624548a42cea/720p.mp4?Expires=1794781295&KeyName=bella-media-key-v1&Signature=...",
"expires_at": "2026-11-15T22:21:35Z"
}