Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your provider API key or Vikat authentication token. Virtual keys (prefixed with sk-vk-, or the legacy sk-bf-) can also be passed here.

Headers

x-vikat-async-job-result-ttl
integer
default:3600

Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.

Body

application/json
model
string
required

Model in provider/model format

input
string
required

Text to convert to speech

voice
required
fallbacks
string[]
stream_format
enum<string>

Set to "sse" to enable streaming

Available options:
sse
instructions
string
response_format
enum<string>
Available options:
mp3,
opus,
aac,
flac,
wav,
pcm
speed
number
Required range: 0.25 <= x <= 4
language_code
string
pronunciation_dictionary_locators
object[]
enable_logging
boolean
optimize_streaming_latency
boolean
with_timestamps
boolean

Response

Job accepted for processing

Response returned when creating or polling an async job

id
string
required

Unique identifier for the async job

status
enum<string>
required

The status of an async job

Available options:
pending,
processing,
completed,
failed
created_at
string<date-time>
required

When the job was created

expires_at
string<date-time>

When the job result expires and will be cleaned up

completed_at
string<date-time>

When the job completed (successfully or with failure)

status_code
integer

HTTP status code of the completed operation

result
any

The result of the completed operation (shape depends on the request type)

error
object

Error response from Vikat