Skip to main content
POST
/
api
/
v1
/
sessions
curl --request POST \ --url https://api.avaturn.live/api/v1/sessions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "avatar_id": "jane_20240829", "conversation_engine": { "type": "text-echo", "tts": { "engine": "elevenlabs", "voice_id": "<voice-id-here>" } }, "background": "default", "model": "delta", "user_absent_timeout": 60, "max_duration": 3600 } '
{
  "session_id": "<string>",
  "token": "<string>"
}

Authorizations

Authorization
string
header
required

avaturn.live API key

Body

application/json
avatar_id
string
default:jane_20240829

Avatar ID

conversation_engine
TextEchoEngineConfig · object

Text-based echo conversation engine.

Allows controlling what avatar says with text. The text is converted into audio using TTS engine. Multiple TTS engines are supported.

background
enum<string>
default:default

Background type for the avatar. 'transparent' removes the background, 'default' uses the avatar's default background

Available options:
transparent,
default
model
enum<string>
default:delta
Available options:
delta,
golf
user_absent_timeout
integer
default:60

Seconds to wait before terminating the session if no user is connected

Required range: x >= 10
max_duration
integer
default:3600

Maximum session duration in seconds (max 24 hours)

Required range: 60 <= x <= 86400

Response

Successful Response

session_id
string
required

Session ID

token
string
required

Session token for Web SDK