Create an AI thumbnail
const url = 'https://api.braiv.co/v1/videos/vid_01JZ8M6A/thumbnails';const options = { method: 'POST', headers: { 'Idempotency-Key': 'import-launch-demo-20260901', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"mode":"prompt","prompt":"A dramatic creator reveal with bright studio lighting"}'};
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/vid_01JZ8M6A/thumbnails \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: import-launch-demo-20260901' \ --data '{ "mode": "prompt", "prompt": "A dramatic creator reveal with bright studio lighting" }'Creates a prompt-directed thumbnail (mode: prompt) or a zero-prompt
thumbnail (mode: zero_prompt) derived from transcript and visual
context. Pipeline thumbnail-v2 is Creative (character subjects).
thumbnail-precision uses one or two content plates and rejects
characters. Auto-detect (autoDetectCharacters or
autoDetectContentReferences) is zero-prompt only and returns 202
with a packaging job id. Prompt Precision requires explicit content
image URLs. Required scope: thumbnails:write.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Braiv library video document ID.
Example
vid_01JZ8M6AHeader 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
Section titled “Request Body ”object
Uses your prompt as the creative direction for thumbnail generation. This is the default mode.
Natural-language description of the thumbnail scene, composition, subjects, and mood. The value must contain non-whitespace text.
Character references to preserve. Not valid with thumbnail-precision.
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.
Public image URL whose visual style and layout should influence the result.
Public image URL providing brand colours, typography, or identity cues.
Composition influence image.
Relative brand-style influence passed to generation.
Reference payload model. Precision uses 2.
thumbnail-v2 is Creative (character subjects). thumbnail-precision
requires contentReferenceImageUrl or contentReferenceImageUrls.
Prompt mode does not accept auto-detect flags.
Primary Precision content plate.
Precision content plates (1–2).
Studio Brand Voice id from listBrandVoices.
Optional Precision headline.
Precision only — omit generated headline text.
Make the first generated image the video poster.
object
Builds the thumbnail direction automatically from the video’s transcript and visual context instead of requiring a creative prompt.
Optional; implied by mode: zero_prompt.
Number of people or characters to preserve from characters. Send a JSON integer from 0 to 3 that matches the supplied array length.
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.
Set to true to make the generated thumbnail the video’s primary poster when generation completes.
Reference payload model. 2 is required for Precision.
Creative (thumbnail-v2) vs Precision (thumbnail-precision). There
is no creative enum value. Precision rejects characters and needs
content plates or autoDetectContentReferences.
Primary content plate when not auto-detecting.
Precision content plates.
Composition influence image.
Style influence image.
Brand influence image.
Relative brand-style influence passed to generation.
Creative only. Returns 202 and queues character detect.
Character detection workflow.
Precision only. Opaque key-moment detect; returns 202.
Number of Precision plates to select when auto-detecting.
Content-reference detection workflow.
Optional focus text that steers opaque key-moment detect.
Optional Precision headline.
Precision only — omit generated headline text.
Effective only with non-empty thumbnailTranslationLanguageCodes.
Languages for translated thumbnail variants.
Brand Voice id from listBrandVoices.
Examples
{ "mode": "prompt", "prompt": "A dramatic creator reveal with bright studio lighting"}Faceless Creative zero-prompt
{ "mode": "zero_prompt", "characterCount": 0, "promoteToPrimary": true}Precision with opaque key-moment detect
{ "mode": "zero_prompt", "pipelineMode": "thumbnail-precision", "autoDetectContentReferences": true, "contentSlotCount": 2, "brandVoiceId": "bv_01"}Responses
Section titled “ Responses ”Request created; synchronous setup may already return generated URLs.
object
Created thumbnail request ID when generation starts synchronously.
Pollable thumbnail job ID, or packaging job ID when detect is queued (202).
queued when a detect-backed automation was registered.
Whether a new automation run was created for a 202 response.
Zero-prompt result when returned synchronously.
Prompt-mode generated images.
Remaining account credit balance.
Example
{ "thumbnailRequestId": "thumb_01", "jobId": "thumbnail_thumb_01", "outputImageUrls": [ "https://cdn.braiv.co/thumb_01.jpg" ], "balance": 280}Zero-prompt automation queued because character or content-moment detect must finish first. Poll the packaging job.
object
Created thumbnail request ID when generation starts synchronously.
Pollable thumbnail job ID, or packaging job ID when detect is queued (202).
queued when a detect-backed automation was registered.
Whether a new automation run was created for a 202 response.
Zero-prompt result when returned synchronously.
Prompt-mode generated images.
Remaining account credit balance.
Example
{ "jobId": "packaging_vid_01JZ8M6A_zeroPromptThumbnail", "status": "queued", "registered": true}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 Idempotency-Key was reused with a different path or request body.
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": "IDEMPOTENCY_REPLAY", "message": "Idempotency-Key was reused with a different request.", "details": { "pathMatch": true, "hashMatch": false } }}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": {} }}