Skip to main content
POST
/
v1
/
sessions
Start an Equos avatar sesssion.
curl --request POST \
  --url https://api.equos.ai/v1/sessions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "client": "<string>",
  "host": {
    "serverUrl": "<string>",
    "accessToken": "<string>"
  },
  "maxDuration": 123,
  "agent": {
    "name": "<string>",
    "client": {},
    "provider": "openai",
    "config": {
      "instructions": "<string>",
      "model": "gpt-4o-realtime-preview",
      "voice": "alloy"
    }
  },
  "avatar": {
    "identity": "<string>",
    "name": "<string>",
    "refImage": "<string>",
    "client": {}
  },
  "remoteAgentConnectingIdentity": {
    "identity": "<string>",
    "name": "<string>"
  },
  "consumerIdentity": {
    "identity": "<string>",
    "name": "<string>"
  }
}'
{
  "session": {
    "id": "<string>",
    "organizationId": "<string>",
    "freemium": true,
    "name": "<string>",
    "provider": "<string>",
    "client": "<string>",
    "status": "<string>",
    "maxDuration": 123,
    "host": {
      "serverUrl": "<string>"
    },
    "avatarId": "<string>",
    "avatar": {
      "id": "<string>",
      "organizationId": "<string>",
      "identity": "<string>",
      "name": "<string>",
      "client": "<string>",
      "thumbnailUrl": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    },
    "agentId": "<string>",
    "agent": {
      "id": "<string>",
      "organizationId": "<string>",
      "name": "<string>",
      "provider": "openai",
      "client": "<string>",
      "config": {
        "instructions": "<string>",
        "model": "gpt-4o-realtime-preview",
        "voice": "alloy"
      },
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    },
    "startedAt": "2023-11-07T05:31:56Z",
    "endedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "consumerAccessToken": "<string>",
  "remoteAgentAccessToken": "<string>"
}

Authorizations

x-api-key
string
header
required

Body

application/json
name
string
required
avatar
object
required

Either provide an existing avatar ID or create a new avatar on the fly.

  • Option 1
  • Option 2
client
string

User-side client identifier.

host
object

[Optional] Host configuration for self-hosted livekit sessions.

maxDuration
number

[Optional] Max session duration in seconds. Must be less than organization limit.

agent
object

[Optional] Either provide an existing agent ID or create a new agent on the fly.

  • Option 1
  • Option 2
remoteAgentConnectingIdentity
object

[Optional] Identity of the agent that will forward audio to your Equos Avatar. Required for self-hosted agents.

consumerIdentity
object

[Optional] Identity of the end user that will interact with the agent in the session. Required if not self-hosted session.

Response

201 - application/json
session
object
required
consumerAccessToken
string
remoteAgentAccessToken
string
I