Trillet AI logo

Create Call Agent

Create a new agent for a workspace.

POSThttps://api.trillet.ai/v1/api/agents

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Request Body

namestringrequired

Name of the agent being created.

ttsModelobjectrequired

Text-to-Speech (TTS) configuration for the agent.

smartCallbackbooleandefault: false

Enable smart callback functionality for the agent.

maxAttemptsForSmartCallbacknumberdefault: 5

Maximum number of callback attempts when smart callback is enabled.

gapBetweenEachAttemptForSmartCallbackarray

Array of time intervals between each callback attempt. Each item contains days and hours.

phoneNumberIdsarray

Array of phone number IDs to associate with the agent.

llmModelstringdefault: platform-llm

Language model the agent uses to generate responses.

Defaults to platform-llm, the managed platform model. It is tuned for voice agents and kept current without any change to your configuration, and it is what agents created in the dashboard start on.

To pin a specific model instead, pass its id, for example gpt-4.1 or gemini-2.5-flash. The models on offer change over time, so call List Available Models for the current set rather than hardcoding one.

settingsobject

Additional settings for the agent.

variablesobject

Custom variables to store for the agent.

Response Fields

_idstring

Unique identifier for the newly created agent. Pass it as agent when you create a call flow to link the two. The agent then shows up inside that call flow and on the Phone Numbers page. An agent serves one call flow, so create a new agent for each flow.

workspaceIdstring

Workspace ID associated with the agent.

userIdstring

User ID of the agent creator.

namestring

Name of the agent.

ttsModelobject

Text-to-Speech configuration for the agent.

providerstring

TTS provider used by the agent.

voiceIdstringdefault: mistv2_Wildflower

Voice ID used for generating speech. (e.g., mistv2_Brook, mistv2_Violet, mistv2_Wildflower)

languagestring

Language code of the TTS voice.

elevenLabsApiKeystring

Encrypted ElevenLabs API key (only present if provider is "11labs_byo").

llmModelstring

Language Model used by the agent to generate responses.

smartCallbackboolean

Whether smart callback is enabled for the agent.

maxAttemptsForSmartCallbacknumber

Maximum number of callback attempts.

gapBetweenEachAttemptForSmartCallbackarray

Array of time intervals between callback attempts.

phoneNumberIdsarray

Array of phone number IDs associated with the agent.

activeSessionsarray

Array of active sessions for the agent.

settingsobject

Additional settings configured for the agent.

statusstring

Current status of the agent (pending, ready, or error).

currentNodestring

Current node or state within the agent's flow.

variablesobject

Custom variables stored for the agent.

createdAtstring

Timestamp when the agent was created.

updatedAtstring

Timestamp when the agent was last updated.

{
  "name": "Customer Support Agent",
  "ttsModel": {
    "provider": "rime",
    "voiceId": "mistv2_Wildflower",
    "name": "Sophie",
    "language": "en"
  },
  "llmModel": "platform-llm",
  "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
  }
}

Last updated on