Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Your authentication credentials. For Basic authentication, please populate Basic $INWORLD_API_KEY. You can create a key in one command with the Inworld CLI: inworld workspace add-key.

Body

application/json

A set of independent synthesis requests submitted as one job. Items may each use a different voice, model, language, and audio format.

items
object[]
required

The requests to synthesize, between 1 and 10000. The whole request must also fit the 16 MiB message limit, which caps the aggregate around 4M characters — the item ceiling is only reachable when items are short.

Required array length: 1 - 10000 elements

Response

The batch was accepted. The returned operation is not yet done; poll it to track progress.

A google.longrunning.Operation tracking an asynchronous or batch synthesis job.

name
string

Server-assigned operation resource name, in the format workspaces/{workspace}/ttsAsyncJobs/{job}/operations/{operation} for async jobs or workspaces/{workspace}/ttsBatchJobs/{batch}/operations/{operation} for batch jobs. Pass it verbatim as the path of the Get operation endpoint to poll for completion.

Example:

"workspaces/{workspace}/ttsAsyncJobs/8f14e45f-ceea-4673-93d8-04f724c8a1b2/operations/1784837936461-p0sEhU"

metadata
object | null

Service-specific metadata associated with the operation. Not populated for TTS jobs yet; job metadata is planned for a later release, so do not write code that depends on this field staying absent.

done
boolean

If false, the job is still running. If true, the job has finished and exactly one of error or response is set.

error
object
response
object

Set when the job succeeded. Its @type identifies which kind: an async job carries SynthesizeSpeechAsyncResponse, a batch job SynthesizeSpeechBatchResponse.