VoiceService
Issue a voice copy token
Inworld Voice API reference: issue a token that lets other workspaces copy one of your custom voices. Tokens expire after seven days.
/voices/v1/voices/{voiceId}:issueCopyTokenCreate a token that lets specific workspaces copy one of your custom voices. Use the source workspace's API key with voice write permission (api.dsgnt.voices::rw).
Issue and share a token
Send the source voice's voiceId, such as source-workspace__narrator, in the URL. Set allowedWorkspaces to at least one destination workspace ID:
curl --request POST 'https://api.inworld.ai/voices/v1/voices/source-workspace__narrator:issueCopyToken' \
--header "Authorization: Basic $SOURCE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"allowedWorkspaces":["destination-workspace"]}'Use bare workspace IDs in allowedWorkspaces, such as destination-workspace. The server trims whitespace, ignores blank entries, and removes duplicate IDs. The response returns bare workspace IDs.
An illustrative response, with other fields omitted:
{
"name": "workspaces/source-workspace/voiceCopyTokens/00000000-0000-4000-8000-000000000001",
"voiceCopyTokenId": "00000000-0000-4000-8000-000000000001",
"allowedWorkspaces": ["destination-workspace"]
}Share the returned voiceCopyTokenId with the destination workspace. Pass it to Redeem a voice copy token.
The token expires seven days after creation. It can be redeemed more than once before expiry. Treat it as a secret. Each successful redemption creates a new, independent private voice; later edits to the original do not update the copies.
Token types
These tokens grant access to workspaces. The email-based tokens created by Voice export in Portal use a separate flow. Workspace-scoped tokens cannot be imported through Portal's email-based flow, and Portal's email-based tokens cannot be redeemed by this API.
Token resource name: workspaces/{workspace}/voiceCopyTokens/{token}. Use the returned voiceCopyTokenId to redeem the token.
Bare IDs of the workspaces allowed to redeem this token. Duplicate IDs are removed.