Skip to main content
POST
/
api
/
open
/
v4
/
liveAvatar
/
session
/
close
Close Session
curl --request POST \
  --url https://openapi.akool.com/api/open/v4/liveAvatar/session/close \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "id": "6698c9d69cf7b0d61d1b6420"
}'
{
  "code": 1000,
  "msg": "OK"
}
Both the avatar_id and voice_id can be easily obtained by copying them directly from the web interface. You can also create and manage your streaming avatars using our intuitive web platform.Create and manage your avatars at: https://akool.com/apps/upload/avatar?from=%2Fapps%2Fstreaming-avatar%2Fedit

Code Examples

curl -X POST --location "https://openapi.akool.com/api/open/v4/liveAvatar/session/close" \
    -H "Authorization: Bearer your_token_here" \
    -H "Content-Type: application/json" \
    -d '{
          "session_id": "session_123456789"
        }'

Response Example

{
  "code": 1000,
  "msg": "ok",
  "data": {
    "session_id": "session_123456789",
    "status": "closed",
    "closed_at": 1700788730000
  }
}

Authorizations

x-api-key
string
header
required

Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded.

Body

application/json
id
string
required

Session ID from the _id field returned by Create Session

Response

200 - application/json

Session closed successfully

code
integer
required

Interface returns business status code (1000: success)

Example:

1000

msg
string
required

Interface returns status information

Example:

"OK"