POST
/
v1
/
personas
curl --request POST \
  --url https://api.anam.ai/v1/personas \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Eva",
  "description": "Eva is the virtual receptionist of the fictional Sunset Hotel.",
  "personaPreset": "eva",
  "avatarId": "123e4567-e89b-12d3-a456-426614174000",
  "voiceId": "123e4567-e89b-12d3-a456-426614174000",
  "voiceSpeed": 1,
  "brainType": {},
  "brain": {
    "systemPrompt": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva. Start with '\''Hi,\n    this is The Sunset Hotel reception, how may I help you?'\'' Be mindful of the hotel'\''s availability: single and double rooms\n    are still available all next week, except Tuesday. Dogs are allowed. There'\''s a restaurant and bar in the lobby. If\n    communication breaks down, ask if they want to speak to a human. Finish every response with a question to drive the\n     conversation. Do not repeat yourself.",
    "personality": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva.",
    "fillerPhrases": [
      "Okay, got it.",
      "I see.",
      "Let me check that for you."
    ],
    "languageModel": "<string>"
  }
}'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "personaPreset": "<string>",
  "avatar": {
    "id": "<string>",
    "displayName": "<string>",
    "variantName": "<string>",
    "imageUrl": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "voice": {
    "id": "<string>",
    "displayName": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "voiceSpeed": 123,
  "brainType": {},
  "brain": {
    "systemPrompt": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva. Start with 'Hi,\n    this is The Sunset Hotel reception, how may I help you?' Be mindful of the hotel's availability: single and double rooms\n    are still available all next week, except Tuesday. Dogs are allowed. There's a restaurant and bar in the lobby. If\n    communication breaks down, ask if they want to speak to a human. Finish every response with a question to drive the\n     conversation. Do not repeat yourself.",
    "personality": "You are role-playing as a text chatbot hotel receptionist at The Sunset Hotel. Your name is Eva.",
    "fillerPhrases": [
      "Okay, got it.",
      "I see.",
      "Let me check that for you."
    ],
    "languageModel": "<string>"
  },
  "isDefaultPersona": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "shareLinks": [
    {
      "id": "<string>",
      "token": "<string>",
      "usageLimit": 123,
      "expiresAt": "2023-11-07T05:31:56Z",
      "usageCount": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

The name for the persona

Example:

"Eva"

brainType
object
required

The type of brain to use for the persona.

brain
object
required

The brain configuration for the persona.

description
string

The description for the persona. This is an optional descriptor and is not used as part of the LLM prompt generation.

Example:

"Eva is the virtual receptionist of the fictional Sunset Hotel."

personaPreset
string
deprecated

personaPreset is deprecated. Use avatar and voice instead.

Example:

"eva"

avatarId
string

The avatar id to use for the persona.

Example:

"123e4567-e89b-12d3-a456-426614174000"

voiceId
string

The voice id to use for the persona.

Example:

"123e4567-e89b-12d3-a456-426614174000"

voiceSpeed
number

The speed of the voice.

Example:

1

Response

201
application/json
id
string
required
name
string
required
avatar
object
required
voice
object
required
voiceSpeed
number
required
brainType
object
required
brain
object
required
isDefaultPersona
boolean
required
createdAt
string
required
updatedAt
string | null
required
description
string
personaPreset
string