The auto-embed API
One REST API to embed any title, fetch metadata and stream your own uploads. Saves where viewers left off, caches fast, and auto-updates sources.
Introduction
The CloudNEXTRA API lets you embed players, pull rich metadata and serve your own uploads from anywhere. Responses are JSON; embeds are plain <iframe> URLs — no SDK required. The auto-embed engine resolves the best available source, caches it, and keeps it fresh automatically.
Authentication
Authenticate every request with your API key in the Authorization header. Create and rotate keys from your dashboard.
Authorization: Bearer cnx_live_8fK2pQ7sR1vT4wX9
Keep keys secret. Never expose a cnx_live_ key in client-side code — use cnx_embed_ public keys for browser embeds.
Base URL
All endpoints are relative to this base. The edge CDN routes you to the nearest of 60+ locations automatically.
Embed a title
Return a ready-to-play player URL for any catalog ID or your own upload ID. Drop it straight into an iframe.
curl https://api.cloudnextra.one/v2/embed/8fK2pQ \ -H "Authorization: Bearer cnx_live_8fK2pQ7sR1vT4wX9"
const res = await fetch("https://api.cloudnextra.one/v2/embed/8fK2pQ", { headers: { Authorization: "Bearer cnx_live_8fK2pQ7sR1vT4wX9" } }); const { embed_url } = await res.json();
<iframe src="https://cdn.cloudnextra.one/embed/8fK2pQ" allow="autoplay; fullscreen" allowfullscreen></iframe>
Response
{
"id": "8fK2pQ",
"embed_url": "https://cdn.cloudnextra.one/embed/8fK2pQ",
"status": "ready",
"qualities": [360, 720, 1080],
"subtitles": ["en", "es", "fr"],
"resume": true
}Get metadata
Fetch title, duration, poster, available qualities and view stats for any ID.
{
"id": "8fK2pQ",
"title": "Summer Trip — Final Cut",
"duration": 742,
"poster": "https://cdn.cloudnextra.one/thumb/8fK2pQ.jpg",
"size_mb": 248,
"views": 48213,
"streamable": true
}Search catalog
Query by keyword and paginate. Great for building an auto-updating grid of titles.
curl "https://api.cloudnextra.one/v2/search?q=nebula&page=1" \ -H "Authorization: Bearer cnx_live_..."
Your uploads
List your own files, check conversion status and pull per-video earnings.
| Field | Type | Description |
|---|---|---|
file | multipart | The video file (≤ 10 GB; streamable ≤ 1 GB or auto-converted). |
title | string | Display title for the player and metadata. |
streamable | boolean | Convert to adaptive HLS so it plays in-browser. |
Errors
Standard HTTP codes. Error bodies include a machine-readable code and human message.
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key. |
| 404 | not_found | No title or upload with that ID. |
| 422 | unprocessable | File type not supported or too large. |
| 429 | rate_limited | Too many requests — slow down. |
Rate limits
| Plan | Requests / min | Embeds | Storage |
|---|---|---|---|
| Free | 60 | Unlimited | 50 GB |
| Creator | 300 | Unlimited | 1 TB |
| Studio | 1,200 | Unlimited | Custom |
Build something great
Grab a free API key from your dashboard and ship your first embed in minutes.