Create a video from a source URL
const url = 'https://api.devstreamcore.com/v1/videos';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"input":[{"url":"https://example.com"}],"title":"example","description":"example","playback_policy":"public","passthrough":"example","quality":"original"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.devstreamcore.com/v1/videos \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "input": [ { "url": "https://example.com" } ], "title": "example", "description": "example", "playback_policy": "public", "passthrough": "example", "quality": "original" }'Ingest a video by URL. Transcoding starts automatically.
Authorizations
Seção intitulada “Authorizations ”Request Body
Seção intitulada “Request Body ”object
object
Responses
Seção intitulada “ Responses ”Video created (status preparing)
A video asset. The shape is stable — fields are only ever added.
object
0–100, aggregated across encode + package jobs
Seconds
Public URL of the original upload; null until landed in R2
Native width of the original upload (px); null when unknown
Native height of the original upload (px); null when unknown
object
object
Encode target bitrate in kb/s; null on legacy rows
Per-resolution HLS variant playlist URL; null when ungated
object
object
object
Example
{ "id": "vid_a1b2c3d4e5f6a1b2c3d4", "status": "preparing", "playback_ids": [ { "id": "play_a1b2c3d4e5f6a1b2c3d4", "policy": "public" } ], "policy": "public", "ingest": { "kind": "direct_upload" }}Invalid request
Error envelope — a single error per response.
object
object
Example
{ "error": { "type": "invalid_request_error" }}Missing or invalid API key
Error envelope — a single error per response.
object
object
Example
{ "error": { "type": "invalid_request_error" }}Quota exceeded (encode minutes / duration / views)
Error envelope — a single error per response.
object
object
Example
{ "error": { "type": "invalid_request_error" }}Rate limited — apply backoff
Error envelope — a single error per response.
object
object
Example
{ "error": { "type": "invalid_request_error" }}