Skip to content

Create an AI thumbnail

POST
/videos/{videoId}/thumbnails
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.

videoId
required
string
>= 1 characters

Braiv library video document ID.

Example
vid_01JZ8M6A
Idempotency-Key
string
>= 1 characters

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-20260901
Media type application/json
Any of: discriminator: mode
object
mode

Uses your prompt as the creative direction for thumbnail generation. This is the default mode.

string
default: prompt
Allowed value: prompt
prompt
required

Natural-language description of the thumbnail scene, composition, subjects, and mood. The value must contain non-whitespace text.

string
>= 1 characters
characters

Character references to preserve. Not valid with thumbnail-precision.

Array<object>
<= 3 items
object
characterId

Saved character profile ID.

string
referenceImageIds

Saved reference image IDs.

Array<string>
<= 10 items
imageUrl

Primary character reference URL.

string format: uri
imageUrls

Additional character reference URLs.

Array<string>
<= 3 items
name

Character display name.

string
position

Desired composition position.

string
action

Desired character pose or action.

string
styleReferenceImageUrl

Public image URL whose visual style and layout should influence the result.

string format: uri
brandReferenceImageUrl

Public image URL providing brand colours, typography, or identity cues.

string format: uri
designInfluenceImageUrl

Composition influence image.

string format: uri
brandInfluence

Relative brand-style influence passed to generation.

number
referenceSchemaVersion

Reference payload model. Precision uses 2.

integer
Allowed values: 1 2
pipelineMode

thumbnail-v2 is Creative (character subjects). thumbnail-precision requires contentReferenceImageUrl or contentReferenceImageUrls. Prompt mode does not accept auto-detect flags.

string
default: thumbnail-v2
Allowed values: thumbnail-v2 thumbnail-precision
contentReferenceImageUrl

Primary Precision content plate.

string format: uri
contentReferenceImageUrls

Precision content plates (1–2).

Array<string>
brandVoiceId

Studio Brand Voice id from listBrandVoices.

string
<= 128 characters
textOverlay

Optional Precision headline.

string
omitTextOverlay

Precision only — omit generated headline text.

boolean
promoteToPrimary

Make the first generated image the video poster.

boolean
Examples
{
"mode": "prompt",
"prompt": "A dramatic creator reveal with bright studio lighting"
}

Request created; synchronous setup may already return generated URLs.

Media type application/json
object
thumbnailRequestId

Created thumbnail request ID when generation starts synchronously.

string
jobId
required

Pollable thumbnail job ID, or packaging job ID when detect is queued (202).

string
status

queued when a detect-backed automation was registered.

string
registered

Whether a new automation run was created for a 202 response.

boolean
thumbnailUrl

Zero-prompt result when returned synchronously.

string format: uri
outputImageUrls

Prompt-mode generated images.

Array<string>
balance

Remaining account credit balance.

number
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.

Media type application/json
object
thumbnailRequestId

Created thumbnail request ID when generation starts synchronously.

string
jobId
required

Pollable thumbnail job ID, or packaging job ID when detect is queued (202).

string
status

queued when a detect-backed automation was registered.

string
registered

Whether a new automation run was created for a 202 response.

boolean
thumbnailUrl

Zero-prompt result when returned synchronously.

string format: uri
outputImageUrls

Prompt-mode generated images.

Array<string>
balance

Remaining account credit balance.

number
Example
{
"jobId": "packaging_vid_01JZ8M6A_zeroPromptThumbnail",
"status": "queued",
"registered": true
}

Request fields are missing, malformed, out of bounds, or mutually inconsistent.

Media type application/json
object
error
required

Structured public API error envelope.

object
code
required

Stable machine-readable error code.

string
Allowed values: UNAUTHENTICATED INVALID_API_KEY INSUFFICIENT_SCOPE PERMISSION_DENIED ROLE_CANNOT_PRODUCE NOT_FOUND INVALID_ARGUMENT UNSUPPORTED_SOURCE DURATION_UNKNOWN INSUFFICIENT_CREDITS CONFLICT ALREADY_EXISTS IDEMPOTENCY_REPLAY RATE_LIMITED PREVIEW_NOT_DOWNLOADABLE DOWNLOAD_TIER_NONE FAILED_PRECONDITION GONE METHOD_NOT_ALLOWED INTERNAL
message
required

Human-readable error summary.

string
details
required

Machine-readable operation-specific context; empty when unavailable.

object
key
additional properties
any
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.

Media type application/json
object
error
required

Structured public API error envelope.

object
code
required

Stable machine-readable error code.

string
Allowed values: UNAUTHENTICATED INVALID_API_KEY INSUFFICIENT_SCOPE PERMISSION_DENIED ROLE_CANNOT_PRODUCE NOT_FOUND INVALID_ARGUMENT UNSUPPORTED_SOURCE DURATION_UNKNOWN INSUFFICIENT_CREDITS CONFLICT ALREADY_EXISTS IDEMPOTENCY_REPLAY RATE_LIMITED PREVIEW_NOT_DOWNLOADABLE DOWNLOAD_TIER_NONE FAILED_PRECONDITION GONE METHOD_NOT_ALLOWED INTERNAL
message
required

Human-readable error summary.

string
details
required

Machine-readable operation-specific context; empty when unavailable.

object
key
additional properties
any
Examples

Authentication header missing

{
"error": {
"code": "UNAUTHENTICATED",
"message": "Missing API key.",
"details": {}
}
}

Authentication succeeded, but the required scope, workspace role, or resource permission is missing.

Media type application/json
object
error
required

Structured public API error envelope.

object
code
required

Stable machine-readable error code.

string
Allowed values: UNAUTHENTICATED INVALID_API_KEY INSUFFICIENT_SCOPE PERMISSION_DENIED ROLE_CANNOT_PRODUCE NOT_FOUND INVALID_ARGUMENT UNSUPPORTED_SOURCE DURATION_UNKNOWN INSUFFICIENT_CREDITS CONFLICT ALREADY_EXISTS IDEMPOTENCY_REPLAY RATE_LIMITED PREVIEW_NOT_DOWNLOADABLE DOWNLOAD_TIER_NONE FAILED_PRECONDITION GONE METHOD_NOT_ALLOWED INTERNAL
message
required

Human-readable error summary.

string
details
required

Machine-readable operation-specific context; empty when unavailable.

object
key
additional properties
any
Examples
Example scope
{
"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.

Media type application/json
object
error
required

Structured public API error envelope.

object
code
required

Stable machine-readable error code.

string
Allowed values: UNAUTHENTICATED INVALID_API_KEY INSUFFICIENT_SCOPE PERMISSION_DENIED ROLE_CANNOT_PRODUCE NOT_FOUND INVALID_ARGUMENT UNSUPPORTED_SOURCE DURATION_UNKNOWN INSUFFICIENT_CREDITS CONFLICT ALREADY_EXISTS IDEMPOTENCY_REPLAY RATE_LIMITED PREVIEW_NOT_DOWNLOADABLE DOWNLOAD_TIER_NONE FAILED_PRECONDITION GONE METHOD_NOT_ALLOWED INTERNAL
message
required

Human-readable error summary.

string
details
required

Machine-readable operation-specific context; empty when unavailable.

object
key
additional properties
any
Example
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found.",
"details": {}
}
}

The Idempotency-Key was reused with a different path or request body.

Media type application/json
object
error
required

Structured public API error envelope.

object
code
required

Stable machine-readable error code.

string
Allowed values: UNAUTHENTICATED INVALID_API_KEY INSUFFICIENT_SCOPE PERMISSION_DENIED ROLE_CANNOT_PRODUCE NOT_FOUND INVALID_ARGUMENT UNSUPPORTED_SOURCE DURATION_UNKNOWN INSUFFICIENT_CREDITS CONFLICT ALREADY_EXISTS IDEMPOTENCY_REPLAY RATE_LIMITED PREVIEW_NOT_DOWNLOADABLE DOWNLOAD_TIER_NONE FAILED_PRECONDITION GONE METHOD_NOT_ALLOWED INTERNAL
message
required

Human-readable error summary.

string
details
required

Machine-readable operation-specific context; empty when unavailable.

object
key
additional properties
any
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.

Media type application/json
object
error
required

Structured public API error envelope.

object
code
required

Stable machine-readable error code.

string
Allowed values: UNAUTHENTICATED INVALID_API_KEY INSUFFICIENT_SCOPE PERMISSION_DENIED ROLE_CANNOT_PRODUCE NOT_FOUND INVALID_ARGUMENT UNSUPPORTED_SOURCE DURATION_UNKNOWN INSUFFICIENT_CREDITS CONFLICT ALREADY_EXISTS IDEMPOTENCY_REPLAY RATE_LIMITED PREVIEW_NOT_DOWNLOADABLE DOWNLOAD_TIER_NONE FAILED_PRECONDITION GONE METHOD_NOT_ALLOWED INTERNAL
message
required

Human-readable error summary.

string
details
required

Machine-readable operation-specific context; empty when unavailable.

object
key
additional properties
any
Example
{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Not enough credits.",
"details": {
"required": 60,
"available": 20,
"shortfall": 40
}
}
}

An unexpected server error occurred.

Media type application/json
object
error
required

Structured public API error envelope.

object
code
required

Stable machine-readable error code.

string
Allowed values: UNAUTHENTICATED INVALID_API_KEY INSUFFICIENT_SCOPE PERMISSION_DENIED ROLE_CANNOT_PRODUCE NOT_FOUND INVALID_ARGUMENT UNSUPPORTED_SOURCE DURATION_UNKNOWN INSUFFICIENT_CREDITS CONFLICT ALREADY_EXISTS IDEMPOTENCY_REPLAY RATE_LIMITED PREVIEW_NOT_DOWNLOADABLE DOWNLOAD_TIER_NONE FAILED_PRECONDITION GONE METHOD_NOT_ALLOWED INTERNAL
message
required

Human-readable error summary.

string
details
required

Machine-readable operation-specific context; empty when unavailable.

object
key
additional properties
any
Example
{
"error": {
"code": "INTERNAL",
"message": "An unexpected error occurred.",
"details": {}
}
}