Skip to main content

Mint a speech-to-text token (in progress)

POST 

/api/v1/llm/stt-token

Mints a short-lived speech-to-text token using the configured Cartesia credential. The request fails when that credential is missing. The client uses this token to call the STT API directly so the backend key never reaches the client.

The following access conditions are preserved as declared intent and are not implemented by generated code: Authorized scoped domain action.

Use this in a guide: Add a spoken conversation to your app (Preview)

Request​

Responses​

STT token minted

Request a speech-to-text token using the configured provider; no body fields are required.​

Section ID: DOC-MA-conversations-api-mintSttToken#example-conversations-mintSttToken-request

Request example

{}

Illustrative response shape; omitted default fields and actual outcomes depend on the operation.​

Section ID: DOC-MA-conversations-api-mintSttToken#example-conversations-mintSttToken-response

Response example

{
"token": "example",
"expiresInSeconds": 1
}

Illustrative response for Separate recipe: dictate a draft without starting a voice agent. Replace example resource identifiers with your own authorized values.​

Section ID: DOC-MA-conversations-api-mintSttToken#example-cookbook-managed-agents-voice-media-index-json-02-response

Response example

{
"token": "stt_eph_...",
"expiresInSeconds": 600
}

Document ID: DOC-MA-conversations-api-mintSttToken. Section identities and revisions.

SectionStable reference
Mint a speech-to-text token (in progress)DOC-MA-conversations-api-mintSttToken#overview
RequestDOC-MA-conversations-api-mintSttToken#request
ResponsesDOC-MA-conversations-api-mintSttToken#responses