Skip to main content
POST
Compose Session Token

Authorizations

x-simli-api-key
string
header
required

Body

application/json
faceId
string
required
apiVersion
string
default:v2
Allowed value: "v2"
sessionAggregator
string | null
handleSilence
boolean
default:true
maxSessionLength
integer
default:3600
maxIdleTime
integer
default:300
startFrame
integer
default:0
audioInputFormat
string
default:pcm16
streaming_width
integer
default:768

Width of the streamed video in pixels, Trinity-2 faces only (the others keep their own frame size). At least 512, and with streaming_height one of 1:1, 16:9 or 9:16, otherwise a 422. A canvas larger than the avatar's frame is padded with its background; a smaller one crops a window out of it.

Required range: x >= 512
streaming_height
integer
default:768

Height of the streamed video in pixels. See streaming_width.

Required range: x >= 512
avatar_position_x
number
default:0.5

Where the avatar sits across the canvas, from 0 (left) to 1 (right). Trinity-2 only.

Required range: 0 <= x <= 1
avatar_position_y
number
default:1

Where the avatar sits down the canvas, from 0 (top) to 1 (bottom). Trinity-2 only.

Required range: 0 <= x <= 1
camera
CameraSetting · object | null

The camera the session starts with, on top of the avatar's own framing. Trinity-2 only. Leave it out to keep the avatar's framing. A streaming session can move it afterwards with CAM_ messages.

background_id
string<uuid> | null

One of your uploaded backgrounds, by the id POST /assets/backgrounds returned, to show behind the avatar, cropped to fill the canvas. Trinity-2 only. Leave it out for the avatar's own. An id that is not one of your account's is dropped with a warning, and the session uses the avatar's own. An image is not accepted: upload it first. A streaming session can change it afterwards with BG_ messages.

foreground_id
string<uuid> | null

One of your uploaded foregrounds, by the id POST /assets/foregrounds returned, laid over the avatar through its transparency and cropped to fill the canvas. Trinity-2 only; otherwise as background_id. A streaming session can change it afterwards with FG_ messages.

Response

Successful Response

session_token
string
warnings
string[]

Starting camera fields outside their supported range, region overrides, and background_id / foreground_id dropped as not your account's (the avatar's own is used). The token is minted regardless.