Skip to main content
POST
/
assistants
Create Assistant
curl --request POST \
  --url https://api.callhq.ai/api/assistants \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "Test Assistant",
  "voice": {
    "provider": "sarvam",
    "voiceId": "anushka",
    "model": "bulbul:v2",
    "language": "en",
    "speed": 1
  },
  "transcriber": {
    "provider": "Deepgram",
    "model": "nova-3",
    "language": "en"
  },
  "model": {
    "provider": "openai",
    "model": "gpt-4o",
    "temperature": 0.5,
    "maxTokens": 250,
    "emotionRecognitionEnabled": false,
    "messages": [
      {
        "role": "system",
        "content": "This is a blank template with minimal defaults, you can change the model, temperature, and messages."
      }
    ],
    "knowledgeBase": {
      "fileIds": [
        "<string>"
      ]
    }
  },
  "firstMessage": "Hello.",
  "firstMessageMode": "assistant-speaks-first",
  "backgroundSound": "office",
  "silenceTimeoutSeconds": 10,
  "backgroundDenoisingEnabled": true,
  "firstMessageInterruptionsEnabled": false,
  "maxDurationSeconds": 3600,
  "analysisPlan": {},
  "knowledgeBase": {
    "fileIds": [
      "<string>"
    ]
  },
  "hangupUsingPrompt": {
    "enabled": false,
    "prompt": "Thank you for calling. Goodbye!"
  }
}
'

Authorizations

x-api-key
string
header
required

Body

application/json
name
string
required
Example:

"Test Assistant"

voice
object
required

Voice configuration. Supports ElevenLabs or Sarvam. For Sarvam, voiceId, model, and language are required.

transcriber
object
required

Speech-to-text configuration.

model
object
required

LLM configuration. Supported providers and models: openai (gpt-4.1-mini, gpt-4.1, gpt-4.1-nano, gpt-4o-mini, gpt-4o, gpt-3.5-turbo), azure (gpt-4.1-mini-cluster, gpt-4.1-cluster, gpt-4.1-nano-cluster, gpt-4o-mini-cluster, gpt-4o-cluster, gpt-4-cluster, gpt-3.5-cluster), openrouter (gpt-oss-20b, gpt-oss-120b, gpt-4, gpt-4o-mini, gpt-4o, gpt-4.1, gpt-4.1-nano, gpt-4.1-mini, claude-sonnet-4), deepseek (deepseek-chat), anthropic (sonnet-4).

firstMessage
string
required
Example:

"Hello."

firstMessageMode
string
required
Example:

"assistant-speaks-first"

backgroundSound
string
Example:

"office"

silenceTimeoutSeconds
integer
Example:

10

backgroundDenoisingEnabled
boolean
Example:

true

firstMessageInterruptionsEnabled
boolean
Example:

false

maxDurationSeconds
integer
Example:

3600

analysisPlan
object

Analysis plan configuration for call insights and follow-up actions.

knowledgeBase
object

Knowledge base at root level. Files are validated against organization ownership.

hangupUsingPrompt
object

Configuration for ending the call using a custom prompt.

Response

Assistant created successfully