Import or reserve a video
const url = 'https://api.braiv.co/v1/videos';const options = { method: 'POST', headers: { 'Idempotency-Key': 'import-launch-demo-20260901', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"source":{"type":"youtube","url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"},"workspaceId":"ws_team_123","products":{"dubs":[{"languages":["es","fr"],"product":"plus"}],"shorts":{"kind":"shorts","numClips":3,"aspectRatio":"9:16"},"packaging":{"title":{"style":"informational"},"description":{"type":"youtube-description"},"thumbnail":{"enabled":true,"pipelineMode":"thumbnail-v2","characterCount":1,"characters":[{"characterId":"char_01"}],"brandVoiceId":"bv_01"}}}}'};
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.braiv.co/v1/videos \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: import-launch-demo-20260901' \ --data '{ "source": { "type": "youtube", "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }, "workspaceId": "ws_team_123", "products": { "dubs": [ { "languages": [ "es", "fr" ], "product": "plus" } ], "shorts": { "kind": "shorts", "numClips": 3, "aspectRatio": "9:16" }, "packaging": { "title": { "style": "informational" }, "description": { "type": "youtube-description" }, "thumbnail": { "enabled": true, "pipelineMode": "thumbnail-v2", "characterCount": 1, "characters": [ { "characterId": "char_01" } ], "brandVoiceId": "bv_01" } } } }'Creates a library video from a supported URL, direct HTTPS asset, or
client upload reservation. URL imports begin immediately. For upload,
use the returned object path and completion route with createVideoUpload.
Optional product recipes are staged to run after ingest prerequisites.
products.packaging.thumbnail accepts true/{} (faceless Creative)
or the full zero-prompt object (Creative thumbnail-v2 or Precision
thumbnail-precision, including opaque key-moment detect).
Optional folderId places the video in an existing Studio folder in the
same personal or workspace library. Create folders with POST /folders
or in Studio. Unknown or inaccessible folders return 404.
Required scope: videos:write.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Caller-generated key for safe POST retries. The API retains the first
JSON response for 24 hours. Reusing a key with another path or body
returns 409 IDEMPOTENCY_REPLAY.
Example
import-launch-demo-20260901Request Body required
Section titled “Request Body required ”Source media, optional workspace destination, optional Studio folder, and post-import recipe.
object
object
Reserves server-authoritative object storage for a client upload.
Upload display/object filename; defaults to upload.mp4. Path separators are rejected.
Upload MIME type; audio/* selects the audio ingest lane.
object
Provider that owns the URL:
youtube— a YouTube watch or share URL.dropbox— a publicly accessible Dropbox share URL.google_drive— a publicly accessible Google Drive share URL.
The value must match the provider represented by url.
Provider share or watch URL.
object
Direct HTTPS fetch.
Publicly fetchable HTTPS media URL.
Destination workspace. Omit for the caller’s personal library.
Existing Studio folder id in the same library as the import. The video is added to that folder (UserVideos.tags). Create folders with POST /folders or in Studio.
Optional workflows staged after ingest.
object
Dub recipes grouped by product and target languages.
object
Unique target languages to dub.
Voice product for every target language.
Shorts-family recipe staged after transcription.
object
Output to generate after transcription:
shorts creates short highlights, promo creates one 45–60 second
promotional edit, and clips creates 5–25 minute landscape excerpts.
Number of outputs requested. The import parser rounds this value; shorts requests support 1–10, while clips execution clamps it to 1–4. Promo requests always create one output.
Minimum length of each shorts output in seconds. It must be no greater than maxDuration; promo and clips workflows use their own duration rules.
Maximum length of each shorts output in seconds. It must be no less than minDuration; promo and clips workflows use their own duration rules.
Output frame shape: 9:16 is vertical, 16:9 is landscape, and
1:1 is square. Promos support 9:16 and 16:9; clips are
always generated in 16:9.
Caption appearance. Valid values are default, karaoke, modern,
impact, subtle, highlight, and pro_highlight; see their
visual behavior in the Create shorts request.
Natural-language guidance describing topics, speakers, or moments to prioritise when selecting clips.
Metadata and thumbnail recipe staged after ingest.
object
Title generation settings; presence enables the job.
object
Tone used for the generated title:
funny— light, clever, or relatable framing.scary— warning, risk, or mistake-to-avoid framing.informational— direct benefit, how-to, or structured-value framing.mysterious— curiosity-gap framing that withholds the payoff.clickbait— bold, high-energy framing using authority or superlatives.
Description generation settings; presence enables the job.
object
Format used for generated copy:
youtube-description— an SEO-oriented YouTube description with chapters, hashtags, and tags.social-post— a concise social post with a hook, takeaways, and hashtags.how-to-guide— a step-by-step Markdown guide with timestamped instructions.blog-post— a long-form Markdown article based on the video.video-summary— a timestamped narrative summary with speaker attribution.
Faceless Creative zero-prompt (characterCount: 0).
Empty object — same as {enabled: true}.
object
object
Enables zero-prompt thumbnail generation.
Number of character references to use.
Character references matching characterCount.
object
Saved character profile ID.
Saved reference image IDs.
Primary character reference URL.
Additional character reference URLs.
Character display name.
Desired composition position.
Desired character pose or action.
Reference payload model. 1 uses the legacy aesthetic, layout, and
design-influence interpretation. 2 separates style recreation
from brand references and enables thumbnail-precision.
Thumbnail generation workflow. thumbnail-v2 supports character,
style, and brand references. thumbnail-precision uses one or two
content-plate references and does not accept character references.
Primary content plate reference.
Precision-mode content plates.
Composition influence image.
Style influence image.
Brand influence image.
Relative brand-style influence passed to generation.
Not available in precision mode.
Character detection workflow. auto accepts detected references and continues; review waits for approval before generation.
Precision only. When omitted and no content plate URLs are sent
Number of distinct content-plate references selected for precision mode. Use 1 for one reference frame or 2 for two complementary frames.
Content-reference detection workflow. auto accepts detected frames and continues; review waits for approval before generation.
Optional focus text that steers opaque key-moment detect.
Optional Precision headline burned into the thumbnail.
When true
Effective only with non-empty thumbnailTranslationLanguageCodes.
Languages for translated thumbnail variants.
Brand voice profile used by thumbnail copy.
Examples
Import and create a dub, shorts, and packaging
{ "source": { "type": "youtube", "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }, "workspaceId": "ws_team_123", "products": { "dubs": [ { "languages": [ "es", "fr" ], "product": "plus" } ], "shorts": { "kind": "shorts", "numClips": 3, "aspectRatio": "9:16" }, "packaging": { "title": { "style": "informational" }, "description": { "type": "youtube-description" }, "thumbnail": { "enabled": true, "pipelineMode": "thumbnail-v2", "characterCount": 1, "characters": [ { "characterId": "char_01" } ], "brandVoiceId": "bv_01" } } }}Reserve an upload
{ "source": { "type": "upload", "fileName": "launch-demo.mp4", "contentType": "video/mp4" }}Fetch HTTPS media into an existing Studio folder
{ "source": { "type": "https", "url": "https://cdn.example.com/launch-demo.mp4" }, "folderId": "fold_01JZ8M6A"}Responses
Section titled “ Responses ”Video accepted. Poll the returned jobs; upload reservations also include upload instructions.
object
Created library video ID.
Initial import state.
Imported video projection when immediately available.
object
Library video ID.
Overall normalized video processing state.
Current video title.
Current video description.
Media duration in seconds.
Current poster image URL.
Internal source provider label.
Ingested media kind.
Detected or selected source language.
Primary playback URL when available.
Playback URLs keyed by language code.
object
Owning workspace, if any.
Studio folder ids this video belongs to (UserVideos.tags).
ISO creation timestamp.
Import pipeline projection.
object
Current lifecycle state for this video subresource.
Language represented by the subresource.
Source transcription projection.
object
Current lifecycle state for this video subresource.
Language represented by the subresource.
Upload reservation instructions returned only for upload sources.
object
Server-authoritative destination object path.
Relative route used to create the upload session.
Import, transcript, and recipe jobs to poll.
object
Deterministic, pollable job ID.
Product workflow represented by the job.
Current normalized job lifecycle state.
Parent video when applicable.
Target language for a dub or caption job.
Dubbing product used by a dub job.
Packaging automation when type is packaging.
Type-specific ready-state artifacts.
object
Terminal failure details when status is failed.
object
Machine-readable job failure code.
Human-readable job failure explanation.
Type-specific identifiers and context.
object
Examples
{ "videoId": "vid_01JZ8M6A", "status": "queued", "jobs": [ { "id": "import_vid_01JZ8M6A", "type": "import", "status": "queued" }, { "id": "transcript_vid_01JZ8M6A", "type": "transcript", "status": "queued" } ]}Request fields are missing, malformed, out of bounds, or mutually inconsistent.
object
Structured public API error envelope.
object
Stable machine-readable error code.
Human-readable error summary.
Machine-readable operation-specific context; empty when unavailable.
object
Example
{ "error": { "code": "INVALID_ARGUMENT", "message": "The request contains invalid or missing fields.", "details": {} }}A supported authentication header is missing or contains an invalid Public API key.
object
Structured public API error envelope.
object
Stable machine-readable error code.
Human-readable error summary.
Machine-readable operation-specific context; empty when unavailable.
object
Examples
Authentication header missing
{ "error": { "code": "UNAUTHENTICATED", "message": "Missing API key.", "details": {} }}API key invalid
{ "error": { "code": "INVALID_API_KEY", "message": "Invalid API key", "details": {} }}Authentication succeeded, but the required scope, workspace role, or resource permission is missing.
object
Structured public API error envelope.
object
Stable machine-readable error code.
Human-readable error summary.
Machine-readable operation-specific context; empty when unavailable.
object
Examples
{ "error": { "code": "INSUFFICIENT_SCOPE", "message": "The API key lacks the required scope.", "details": {} }}The resource does not exist or is not accessible to the caller.
object
Structured public API error envelope.
object
Stable machine-readable error code.
Human-readable error summary.
Machine-readable operation-specific context; empty when unavailable.
object
Example
{ "error": { "code": "NOT_FOUND", "message": "Resource not found.", "details": {} }}The source already exists, or the idempotency key was reused for a different request.
object
Structured public API error envelope.
object
Stable machine-readable error code.
Human-readable error summary.
Machine-readable operation-specific context; empty when unavailable.
object
Example
{ "error": { "code": "UNAUTHENTICATED" }}The source provider is unsupported or its duration cannot be resolved.
object
Structured public API error envelope.
object
Stable machine-readable error code.
Human-readable error summary.
Machine-readable operation-specific context; empty when unavailable.
object
Example
{ "error": { "code": "UNAUTHENTICATED" }}The account has insufficient credits, or the request exceeded a rate limit.
object
Structured public API error envelope.
object
Stable machine-readable error code.
Human-readable error summary.
Machine-readable operation-specific context; empty when unavailable.
object
Example
{ "error": { "code": "INSUFFICIENT_CREDITS", "message": "Not enough credits.", "details": { "required": 60, "available": 20, "shortfall": 40 } }}An unexpected server error occurred.
object
Structured public API error envelope.
object
Stable machine-readable error code.
Human-readable error summary.
Machine-readable operation-specific context; empty when unavailable.
object
Example
{ "error": { "code": "INTERNAL", "message": "An unexpected error occurred.", "details": {} }}