Skip to main content
POST
/
v1
/
auth
/
session-token
create session token
curl --request POST \
  --url https://api.anam.ai/v1/auth/session-token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "personaConfig": {
    "name": "Cara",
    "avatarId": "071b0286-4cce-4808-bee2-e642f1062de3",
    "voiceId": "de23e340-1416-4dd8-977d-065a7ca11697",
    "llmId": "a7cf662c-2ace-4de1-a21e-ef0fbf144bb7",
    "systemPrompt": "You are a helpful assistant."
  }
}
'
{
  "sessionToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uSWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAifQ.signature"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Configuration for the session to be created. Supply personaConfig.personaId to use a persona you've already created (stateful), or the set avatarId/voiceId/llmId/systemPrompt to configure the persona at run time (ephemeral).

The returned token is valid for one hour and bound to this exact config.

clientLabel
string

The client label for the session

personaConfig
object
sessionOptions
object

Response

Successfully started session

Short-lived credential used by a client to connect to a live persona. Valid for one hour.

sessionToken
string

Signed JWT the client passes to the Anam SDK to open a WebRTC connection.

Last modified on April 22, 2026