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.
/v1/agentsagents:writenameHuman-readable name for this agent.
configAgent config. Only `model` is required; all other fields are optional.
modelstringModel code (required). Sets the brain, voice quality, and per-minute price.
voiceIdstringVoice ID. Must belong to the chosen model. Defaults to the model's first voice.
systemPromptstringAgent instructions — who it is, what it does, what it must not say.
firstMessagestringOpening line spoken when the call connects.
welcomeMessageIdstringPlay a pre-recorded greeting at pickup instead of speaking firstMessage. Must be a ready welcome message.
maxConversationTimenumberHard call-length cap in seconds (120–1200). Agent hangs up at this point.
toolsarrayTools the agent can call mid-conversation.
transferobjectEnable human transfer. See Agent configuration docs.
endCallobjectEnable agent-initiated hangup. See Agent configuration docs.
{
"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"
}AuthorizationBody
namerequiredconfigrequired