v4
latestOpenAPI 3.1.02026-08-086635375.7 KBSessions
create session token
Create a new session token used to initialise Anam client side SDKs
post/v1/auth/session-token
Request body
Example request
{
"personaConfig": {
"name": "Cara",
"avatarId": "071b0286-4cce-4808-bee2-e642f1062de3",
"avatarModel": "cara-4",
"voiceId": "de23e340-1416-4dd8-977d-065a7ca11697",
"llmId": "a7cf662c-2ace-4de1-a21e-ef0fbf144bb7",
"systemPrompt": "You are a helpful assistant",
"maxSessionLengthSeconds": 600,
"initialMessage": "Hi there! I'm excited to chat with you today.",
"voiceDetectionOptions": {
"endOfSpeechSensitivity": 0.5,
"silenceBeforeSkipTurnSeconds": 5,
"silenceBeforeSessionEndSeconds": 60,
"silenceBeforeAutoEndTurnSeconds": 5,
"speechEnhancementLevel": 0.8
},
"voiceGenerationOptions": {
"stability": 0.5,
"speed": 1
},
"directorNotes": {
"presetStyle": "warm",
"customStylePrompt": "Warm smile, composed, slightly amused, looking directly at camera",
"expressivity": 0.5
},
"tools": [
{
"type": "client",
"name": "open_calendar",
"description": "Open the calendar UI in the client app.",
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Date to jump to, in YYYY-MM-DD format."
}
}
}
}
]
},
"sessionOptions": {
"sessionReplay": {
"enableSessionReplay": true
},
"videoQuality": "high",
"showAIAvatarDisclosure": true,
"videoWidth": 1152,
"videoHeight": 768,
"egress": {
"mode": "daily",
"daily": {
"roomUrl": "https://your-domain.daily.co/avatar-room"
}
}
}
}Response
Successfully started session