Trillet AI logo

Create Call Agent

Create a new agent for a workspace.

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

Headers

x-api-keystringrequired

API key used for authenticating requests to the API.

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.

llmModelstringrequireddefault: gpt-4o-mini

Language Model to be used by the agent to generate responses. Must be one of: gpt-4o-mini, gpt-4o, gpt-4o-enterprise, gpt-4.1, gpt-4.1-mini, gpt-4.1-enterprise, gpt-4.1-mini-enterprise, gemini-2.5-flash, gemini-2.0-flash-001.

settingsobject

Additional settings for the agent.

variablesobject

Custom variables to store for the agent.

Response Fields

_idstring

Unique identifier for the newly created agent.

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": "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
  }
}