Skip to content

Generate captions with the customer's AI (OpenAI or Google)

POST
/v1/videos/{video}/captions/generate
curl --request POST \
--url https://api.replifier.com/v1/videos/vid_01hx0000000000000000000000/captions/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "locale": "example", "language": "example" }'

Requires the customer’s AI key in the account. Without a key: captions_provider_missing. With Anthropic: captions_provider_unsupported.

video
required
string
/^vid_[a-z0-9]{26}$/

Example

vid_01hx0000000000000000000000
Media typeapplication/json
object
locale
required
string
/^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$/
language
string
<= 60 characters /^[^\x00-\x1f\x7f]*$/

Example generated

{
"locale": "example",
"language": "example"
}

Generation in progress (status: processing)

Media typeapplication/json
object
locale
required
string
source
required
string
Allowed values: upload ai
status
required
string
Allowed values: ready processing failed
aiProvider
required
string
nullable
failureCode
required
string
nullable
createdAt
required
string
editedAt
required
string
nullable

Example

{
"source": "upload",
"status": "ready"
}

Invalid data

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

No session, expired session, or invalid, expired or revoked API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Does not exist or is not visible to you

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Internal error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Service temporarily unavailable

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}