POST
/
v2
/
personas
curl --request POST \
  --url https://tavusapi.com/v2/personas \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "persona_name": "Life Coach",
  "system_prompt": "As a Life Coach, you are a dedicated professional who specializes in...",
  "context": "Here are a few times that you have helped an individual make a breakthrough in...",
  "default_replica_id": "r79e1c033f",
  "layers": {
    "llm": {
      "model": "<string>",
      "base_url": "your-base-url",
      "api_key": "your-api-key",
      "tools": [
        {
          "type": "function",
          "function": {
            "name": "get_current_weather",
            "description": "Get the current weather in a given location",
            "parameters": {
              "type": "object",
              "properties": {
                "location": {
                  "type": "string",
                  "description": "The city and state, e.g. San Francisco, CA"
                },
                "unit": {
                  "type": "string",
                  "enum": [
                    "celsius",
                    "fahrenheit"
                  ]
                }
              },
              "required": [
                "location"
              ]
            }
          }
        }
      ]
    },
    "tts": {
      "api_key": "your-api-key",
      "tts_engine": "cartesia",
      "external_voice_id": "external-voice-id",
      "voice_settings": {
        "speed": "normal",
        "emotion": [
          "positivity:high",
          "curiosity"
        ]
      },
      "playht_user_id": "your-playht-user-id",
      "tts_emotion_control": "false",
      "tts_model_name": "sonic"
    },
    "vqa": {
      "enable_vision": "false",
      "prompt": "What is in this image?"
    },
    "stt": {
      "stt_engine": "tavus-turbo",
      "participant_pause_sensitivity": "low",
      "participant_interrupt_sensitivity": "low",
      "hotwords": "This is a hotword example",
      "smart_turn_detection": true
    }
  }
}'
{
  "persona_id": "p5317866",
  "persona_name": "Life Coach",
  "created_at": "<string>"
}

Authorizations

x-api-key
string
header
required

Body

application/json
persona_name
string

A name for the persona.

system_prompt
string

This is the system prompt that will be used by the llm.

context
string

This is the context that will be used by the llm.

default_replica_id
string

The default replica_id associated with this persona if one exists. When creating a conversation, a persona_id with a default_replica_id associated can we used to create a conversation without specifying a replica_id.

layers
object

Response

200 - application/json
persona_id
string

A unique identifier for the persona.

persona_name
string

The name of the persona.

created_at
string

The date and time the persona was created.