Skip to main content
POST
/
access-token
Generate a New Access Token
curl --request POST \
  --url https://api.cartesia.ai/access-token \
  --header 'Cartesia-Version: <cartesia-version>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "grants": {
    "tts": true,
    "stt": true
  },
  "expires_in": 123
}'
{
  "token": "<string>"
}

Authorizations

X-API-Key
string
header
required

Headers

Cartesia-Version
enum<string>
required

API version header. Must be set to the API version, e.g. '2024-06-10'.

Available options:
2024-06-10,
2024-11-13,
2025-04-16
Example:

"2024-06-10"

Body

application/json
grants
object

The permissions to be granted via the token. Both TTS and STT grants are optional - specify only the capabilities you need.

expires_in
integer | null

The number of seconds the token will be valid for since the time of generation. The maximum is 1 hour (3600 seconds).

Response

200 - application/json
token
string
required

The generated Access Token.

I