POST
/
v1
/
api
/
agents
Create Call Agent
curl --request POST \
  --url https://api.trillet.ai/v1/api/agents \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{
  "name": "<string>",
  "ttsModel": {
    "provider": "<string>",
    "voiceId": "<string>",
    "language": "<string>",
    "elevenLabsApiKey": "<string>"
  },
  "smartCallback": true,
  "maxAttemptsForSmartCallback": 123,
  "gapBetweenEachAttemptForSmartCallback": [
    {
      "days": 123,
      "hours": 123
    }
  ],
  "phoneNumberIds": [
    {}
  ],
  "llmModel": "<string>",
  "settings": {
    "speed": 123,
    "volume": 123,
    "temperature": 123
  },
  "variables": {}
}'
{
  "name": "Customer Support Agent",
  "ttsModel": {
    "provider": "rime",
    "voiceId": "mistv2_Wildflower",
    "name": "Sophie",
    "language": "en"
  },
  "llmModel": "gpt-4o",
  "type": "voice",
  "smartCallback": true,
  "maxAttemptsForSmartCallback": 3,
  "gapBetweenEachAttemptForSmartCallback": [
    { "days": 1, "hours": 2 },
    { "days": 2, "hours": 0 },
    { "days": 3, "hours": 6 }
  ],
  "settings": {
    "speed": 0.8,
    "volume": 1,
    "temperature": 0.7
  }
}

Headers

x-api-key
string
required
API key used for authenticating requests to the API.
x-workspace-id
string
required
Workspace identifier for the API.

Request Body

name
string
required
Name of the agent being created.
ttsModel
object
required
Text-to-Speech (TTS) configuration for the agent.
smartCallback
boolean
default:"false"
Enable smart callback functionality for the agent.
maxAttemptsForSmartCallback
number
default:"5"
Maximum number of callback attempts when smart callback is enabled.
gapBetweenEachAttemptForSmartCallback
array
Array of time intervals between each callback attempt. Each item contains days and hours.
phoneNumberIds
array
Array of phone number IDs to associate with the agent.
llmModel
string
default:"gpt-4o-mini"
required
Language Model to be used by the agent to generate responses. Must be one of: gpt-4o-mini, gpt-4o-enterprise, gpt-4.1, gpt-4.1-mini, gemini-2.5-flash-preview-native-audio-dialog, gemini-2.5-flash, gemini-live-2.5-flash-preview, geminiaudiopipeline:gemini-2.5-flash-preview-native-audio-dialog, gemini-2.0-flash-live-001, gpt-5.
settings
object
Additional settings for the agent.
variables
object
Custom variables to store for the agent.

Response Fields

_id
string
Unique identifier for the newly created agent.
workspaceId
string
Workspace ID associated with the agent.
userId
string
User ID of the agent creator.
name
string
Name of the agent.
ttsModel
object
Text-to-Speech configuration for the agent.
provider
string
TTS provider used by the agent.
voiceId
string
default:"mistv2_Wildflower"
Voice ID used for generating speech. (e.g., mistv2_Brook, mistv2_Violet, mistv2_Wildflower)
language
string
Language code of the TTS voice.
elevenLabsApiKey
string
Encrypted ElevenLabs API key (only present if provider is “11labs_byo”).
llmModel
string
Language Model used by the agent to generate responses.
smartCallback
boolean
Whether smart callback is enabled for the agent.
maxAttemptsForSmartCallback
number
Maximum number of callback attempts.
gapBetweenEachAttemptForSmartCallback
array
Array of time intervals between callback attempts.
phoneNumberIds
array
Array of phone number IDs associated with the agent.
activeSessions
array
Array of active sessions for the agent.
settings
object
Additional settings configured for the agent.
status
string
Current status of the agent (pending, ready, or error).
currentNode
string
Current node or state within the agent’s flow.
variables
object
Custom variables stored for the agent.
createdAt
string
Timestamp when the agent was created.
updatedAt
string
Timestamp when the agent was last updated.
{
  "name": "Customer Support Agent",
  "ttsModel": {
    "provider": "rime",
    "voiceId": "mistv2_Wildflower",
    "name": "Sophie",
    "language": "en"
  },
  "llmModel": "gpt-4o",
  "type": "voice",
  "smartCallback": true,
  "maxAttemptsForSmartCallback": 3,
  "gapBetweenEachAttemptForSmartCallback": [
    { "days": 1, "hours": 2 },
    { "days": 2, "hours": 0 },
    { "days": 3, "hours": 6 }
  ],
  "settings": {
    "speed": 0.8,
    "volume": 1,
    "temperature": 0.7
  }
}