Skip to main content
POST
/
v1
/
agents
Create Agent
curl --request POST \
  --url https://api.talkifai.dev/v1/agents \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "Customer Support Bot",
  "description": "Handles tier-1 support queries",
  "sysMsg": "You are a helpful customer support agent.",
  "agentArchitecture": "pipeline",
  "model": "gpt_4o_mini",
  "stt": "deepgram",
  "voiceId": "gemini-leda-en",
  "realtimeProvider": "openai",
  "greetingType": "agentFirst",
  "greetingMessage": "Hello! How can I help you today?",
  "temperature": 0.7,
  "inactivityTimeout": 30,
  "mode": "public",
  "languages": [
    "english"
  ],
  "functionCallingEnabled": false,
  "enabledFunctions": [],
  "enabledCustomFunctions": []
}
'
{
  "success": true,
  "data": {
    "agent": {
      "id": "5b710eca-ee67-4c3a-aeb6-8b541f451b40",
      "name": "Customer Support Bot",
      "description": "Handles tier-1 support queries",
      "agentArchitecture": "pipeline",
      "model": "gpt_4o_mini",
      "stt": "deepgram",
      "voiceId": "gemini-leda-en",
      "realtimeProvider": "openai",
      "sysMsg": "You are a helpful customer support agent for Acme Corp. Be concise and friendly.",
      "greetingType": "agentFirst",
      "greetingMessage": "Hello! How can I help you today?",
      "temperature": 0.7,
      "inactivityTimeout": 30,
      "lastMessage": "Is there anything else I can help you with?",
      "mode": "public",
      "functionCallingEnabled": false,
      "enabledFunctions": [
        "<string>"
      ],
      "enabledCustomFunctions": [
        "<string>"
      ],
      "languages": [
        {
          "id": "<string>",
          "language": "en"
        }
      ],
      "userId": "<string>",
      "organizationId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  }
}

Authorizations

x-api-key
string
header
required

Your TalkifAI API key. Generate from Studio → Settings → API Keys. Format: tk_live_...

Body

application/json
name
string
required
Example:

"Customer Support Bot"

description
string
required
Example:

"Handles tier-1 support queries"

sysMsg
string
required
Example:

"You are a helpful customer support agent."

agentArchitecture
enum<string>
default:pipeline
Available options:
pipeline,
realtime,
text
model
string

Required for pipeline and text

Example:

"gpt_4o_mini"

stt
string

Required for pipeline

Example:

"deepgram"

voiceId
string

Defaults to gemini-leda-en for pipeline if omitted

Example:

"gemini-leda-en"

realtimeProvider
enum<string>

Required for realtime

Available options:
openai,
gemini
greetingType
enum<string>
default:agentFirst
Available options:
agentFirst,
userFirst
greetingMessage
string
Example:

"Hello! How can I help you today?"

temperature
number
default:0.7
Required range: 0 <= x <= 2
inactivityTimeout
integer
default:30
Required range: 10 <= x <= 60
mode
enum<string>
default:public
Available options:
public,
private,
commercial
languages
string[]
Example:
["english"]
functionCallingEnabled
boolean
default:false
enabledFunctions
string[]
enabledCustomFunctions
string[]

Response

Agent created successfully

success
boolean
data
object