Skip to main content
POST
/
personas
Create persona
curl --request POST \
  --url https://api.coval.dev/v1/personas \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "Friendly Spanish Customer",
  "persona_prompt": "You are a friendly Spanish-speaking customer calling for technical support...",
  "voice_name": "marina",
  "language_code": "es-ES",
  "background_sound": "office",
  "wait_seconds": 0.5,
  "conversation_initiation": "speak_first"
}
'
{
  "persona": {
    "resource_name": "personas/3zfmuDbVQsi4GaseDtiVcS",
    "id": "3zfmuDbVQsi4GaseDtiVcS",
    "name": "Friendly Customer",
    "create_time": "2025-01-24T10:00:00Z",
    "persona_prompt": "You are a friendly customer calling for technical support...",
    "voice_name": "aria",
    "language_code": "en-US",
    "background_sound": "office",
    "background_sound_volume": 0.3,
    "voice_volume": 1.25,
    "voice_speed": 0.85,
    "wait_seconds": 0.5,
    "conversation_initiation": "speak_first",
    "multi_language_stt": true,
    "hold_music_timeout_seconds": 15,
    "tags": [
      "voice",
      "english"
    ],
    "update_time": "2025-01-24T12:30:00Z"
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Body

application/json
name
string
required

Human-readable persona name

Required string length: 1 - 200
Example:

"Friendly Customer"

voice_name
string
required

Coval voice name. Use GET /personas/voices to discover available voices and their supported language codes.

Example:

"aria"

language_code
string
required

BCP-47 language code for voice synthesis. Must be supported by the selected voice. Use GET /personas/voices to discover valid voice and language combinations.

Example:

"en-US"

persona_prompt
string | null

Instructions describing persona behavior and personality

Example:

"You are a friendly customer calling for support..."

background_sound
enum<string> | null

Background noise type

Available options:
off,
office,
lounge,
crowd,
airport,
bus,
playground,
doorbell,
train-arrival,
portable-air-conditioner,
skatepark,
small-dog-bark,
cafe,
ferry-and-announcement,
heavy-rain,
moderate-wind,
newborn-baby-crying,
office-with-alarm,
street-with-sirens,
construction-work
Maximum string length: 100
Example:

"office"

background_sound_volume
number<float> | null

Volume level for background sound (>= 0.0, no upper limit). Default is provider-controlled when omitted.

Required range: x >= 0
Example:

0.3

voice_volume
number<float> | null

Voice gain multiplier. 0.0 is silent, 1.0 is unchanged, and 2.0 is double volume.

Required range: 0 <= x <= 2
Example:

1.25

voice_speed
number<float> | null

Voice speed multiplier accepted and stored from 0.25 to 2.0. 1.0 is unchanged. The selected voice may enforce a narrower effective range or ignore speed changes.

Required range: 0.25 <= x <= 2
Example:

0.85

wait_seconds
number<float> | null

Response delay in seconds

Required range: 0.1 <= x <= 2
Example:

0.5

conversation_initiation
enum<string> | null

Who initiates the conversation

Available options:
speak_first,
wait_for_user
Example:

"speak_first"

multi_language_stt
boolean | null

Enable multilingual speech-to-text so callers speaking languages other than the primary language_code are still transcribed accurately.

Example:

true

hold_music_timeout_seconds
number<float> | null

Disconnect after this many seconds of no speech (5-300)

Required range: 5 <= x <= 300
tags
string[] | null

Tags to associate with this persona. Null or omitted creates the persona with no tags. Pass [] for an empty tag list.

Example:
["voice", "english"]

Response

Persona created successfully

persona
object
required

Persona resource representation returned by API responses.