Create agent
Configure a new conversational voice agent with a persona prompt, a real-time model, a synthetic voice, and the tools it may call.
Configure a new conversational voice agent with a persona prompt, a real-time model, a synthetic voice, and the tools it may call.
Authorization
ApiKeyAuth Voice platform authentication secret. Create one from the API Keys endpoint or your dashboard.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/agents" \ -H "Content-Type: application/json" \ -d '{ "name": "Sales Outreach Bot", "systemPrompt": "You are a friendly sales assistant for Acme Corp. Keep replies short.", "callingProvider": "local_voice", "firstMessage": "Hello, am I speaking with the customer?", "language": "en", "model": "gpt-4o-realtime-preview", "temperature": 70, "toolIds": [ "tool_19ja0s" ], "ttsVoice": "af_heart", "voiceId": "alloy" }'{ "id": "string", "name": "string", "callingProvider": "string", "firstMessage": "string", "language": "string", "model": "string", "status": "string", "temperature": 0, "toolIds": [ "string" ], "ttsVoice": "string", "voiceId": "string", "updatedAt": "string"}{ "statusCode": 400, "message": [ "name should not be empty" ], "error": "Bad Request"}{ "statusCode": 401, "message": "Unauthorized", "error": "Unauthorized"}