Quote a product bundle
const url = 'https://api.braiv.co/v1/videos/vid_01JZ8M6A/quote';const options = { method: 'POST', headers: { 'Idempotency-Key': 'import-launch-demo-20260901', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"dubs":[{"product":"premium","languages":["es"]}],"shorts":{"kind":"shorts","numClips":3,"includeWatermark":false},"zeroPromptThumbnail":{"enabled":true,"characterCount":1,"referenceProducts":["thumbnail-style-reference"],"translateLanguageCodes":["es"],"autoDetectContentMoments":true}}'};
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/quote \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: import-launch-demo-20260901' \ --data '{ "dubs": [ { "product": "premium", "languages": [ "es" ] } ], "shorts": { "kind": "shorts", "numClips": 3, "includeWatermark": false }, "zeroPromptThumbnail": { "enabled": true, "characterCount": 1, "referenceProducts": [ "thumbnail-style-reference" ], "translateLanguageCodes": [ "es" ], "autoDetectContentMoments": true } }'Calculates the exact credits required without debiting the account. Duration is resolved from the video unless supplied. Required scope: videos:read.
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 ”One or more billable actions. Empty bundles return a zero quote.
object
Settled billing duration; otherwise resolved from the source video.
Dubs included in the quote or reservation.
object
Dubbing product to price.
Target languages priced separately.
Caption translation languages to price.
Reserve source transcription as a standalone action.
Shorts-family bundle to price.
object
Shorts-family product to price:
shorts prices short highlights, promo prices one promotional
edit, and clips prices long-form excerpts.
Number of clips priced; defaults to one.
Affects clip pricing and subscriber rebates.
Pricing hint consumed by the bundle pricer.
Adds the promo soundtrack product.
Adds generated thumbnail pricing to each long clip.
Zero-prompt thumbnail bundle to price.
object
Only true creates thumbnail line items.
Additional catalog products used as references.
Character reference slots added to pricing.
Thumbnail translation languages priced individually.
Adds the content-moment-detect line item. Set this when the
generation recipe uses Precision autoDetectContentReferences.
Quote field name stays autoDetectContentMoments for pricing.
Example
{ "dubs": [ { "product": "premium", "languages": [ "es" ] } ], "shorts": { "kind": "shorts", "numClips": 3, "includeWatermark": false }, "zeroPromptThumbnail": { "enabled": true, "characterCount": 1, "referenceProducts": [ "thumbnail-style-reference" ], "translateLanguageCodes": [ "es" ], "autoDetectContentMoments": true }}Responses
Section titled “ Responses ”Current pricing, balance, shortfall, and per-action breakdown.
object
Total credits required by all line items.
Settled duration used for pricing.
Pricing ruleset identifier.
Current account credit balance.
If true, wallet shortfall does not block the operation.
Additional wallet credits required; zero with usage billing.
Whether billing can cover the quoted total.
Per-action pricing lines.
object
Billable action consumed by downstream work.
Internal catalog product used for pricing.
Language charged by this line
Exact credits quoted or reserved.
Human-readable line-item summary.
Example
{ "total": 126, "durationSeconds": 184, "pricingVersion": "2026-09-10-captions-paid", "balance": 300, "usageBillingActive": false, "shortfall": 0, "sufficient": true, "breakdown": [ { "actionKey": "dub", "product": "cloning-dubbing", "targetLanguageCode": "es", "credits": 46, "description": "Dub to es" }, { "actionKey": "shorts-clip", "product": "shorts-clip", "credits": 60, "description": "Generate 3 short clip(s)" }, { "actionKey": "zero-prompt-thumbnail", "product": "thumbnail-create", "credits": 20, "description": "Generate thumbnail" }, { "actionKey": "content-moment-detect", "product": "content-moment-detect", "credits": 20, "description": "Detect key moments" } ]}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 } }}Duration-priced work cannot be quoted because media duration is unknown.
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 API key exceeded its allowed concurrency or request rate. Retry after in-flight work completes or the limit resets.
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": "RATE_LIMITED", "message": "API key concurrency limit reached", "details": {} }}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": {} }}