Agents · API Reference

Create Agent

Creates a new agent with the given name and config. Pick a `model` by its code and a `voiceId` — the mode (realtime vs cascading) is derived from the model automatically. Only `model` is required inside `config`; everything else is optional. See [Agent configuration](/documentation/agents/configuration) for the full field reference.

POST/v1/agents
Scope:agents:write
Request Body
name
stringrequired

Human-readable name for this agent.

config
objectrequired

Agent config. Only `model` is required; all other fields are optional.

modelstring

Model code (required). Sets the brain, voice quality, and per-minute price.

voiceIdstring

Voice ID. Must belong to the chosen model. Defaults to the model's first voice.

systemPromptstring

Agent instructions — who it is, what it does, what it must not say.

firstMessagestring

Opening line spoken when the call connects.

welcomeMessageIdstring

Play a pre-recorded greeting at pickup instead of speaking firstMessage. Must be a ready welcome message.

maxConversationTimenumber

Hard call-length cap in seconds (120–1200). Agent hangs up at this point.

toolsarray

Tools the agent can call mid-conversation.

transferobject

Enable human transfer. See Agent configuration docs.

endCallobject

Enable agent-initiated hangup. See Agent configuration docs.

Responses
{
  "id": "agt_xxxxxxxxxxxx",
  "productId": "prd_xxxxxxxxxxxx",
  "name": "Support Agent",
  "config": {
    "model": "nirwana-1-flash",
    "voiceId": "asha",
    "systemPrompt": "You are a helpful support agent.",
    "firstMessage": "Hi, how can I help?"
  },
  "currentVersion": 1,
  "updatedAt": "2025-05-27T09:00:00Z"
}
PlaygroundPOST
Authorization

Body

namerequired
configrequired