Agents
Create agent with AI
Creates a new agent using AI generation. Accepts either a guided questionnaire (array of Q&A pairs) or a free-text description. The AI generates the agent's prompt and configuration. A security check is run on the generated prompt before the agent is persisted. Deducts credits on success.
Rules:
- Either questions (non-empty array) or description must be provided — not both.
- emotiveToggle, voiceId, and voiceModel must either all be present or all be absent.
- When emotiveToggle=true, voiceModel must be GPT_REALTIME.
- When emotiveToggle=false, voiceModel cannot be GPT_REALTIME.
post/agent/with-ai
Request body
Response
Agent created — returns the new agent's ObjectId
Example response
{
"success": true
}