AI Agents v2
Create AI Agent
API Reference
Built-in Tools
Custom Tools
Calls
Post-call Analysis
Phone Numbers
- GETRetrieve a paginated list of all phone numbers configured in your PIA Platform account
- POSTCreate a new phone number
- GETRetrieve detailed information about a specific phone number configuration
- DELRemove a phone number configuration from the PIA Platform
- PATCHUpdate the configuration of an existing phone number
Knowledge Bases
Knowledge Bases v2
Prompt Generation
Public Sharing
AI Agents v2
Create AI Agent
Create a new AI agent with the provided configuration.
POST
/
v2
/
ai-agents
{
"ai_agent_id": "<string>",
"agent_name": "<string>",
"language_code": "en-US",
"llm": {
"llm_id": "<string>",
"llm_type": "<string>",
"model_provider": "openai",
"model_name": "<string>",
"model_temperature": 0,
"llm_name": "<string>",
"llm_description": "<string>",
"base_url": "<string>",
"api_key": "<string>",
"max_tokens": 123,
"required_dynamic_data": [
"<string>"
],
"system_prompt": "<string>",
"tools": [
{}
]
},
"stt": {
"provider": "<string>",
"model": "nova-2-general"
},
"tts": {
"provider": "<string>",
"voice_id": "<string>",
"voice_name": "<string>",
"model_name": "eleven_turbo_v2_5",
"voice_temperature": 0.5
},
"knowledge_base_id": "<string>",
"enable_user_interruptions": true,
"minimum_speech_duration_for_interruptions": 0.5,
"minimum_words_before_interruption": 0,
"wait_time_before_detecting_end_of_speech": 0.5,
"ambient_sound": "none",
"ambient_sound_volume": 1,
"webhook_url": "<string>",
"end_call_after_silence_seconds": 10,
"max_call_duration_seconds": 1800,
"welcome_message": "<string>",
"voicemail_detection_timeout_seconds": 90,
"dynamic_data_config": [
{
"url": "<string>",
"method": "<string>",
"timeout": 123,
"headers": {},
"body": {},
"query": {},
"cache": true,
"response_data": [
{
"name": "<string>",
"data": "<string>",
"context": "<string>"
}
]
}
],
"post_call_analysis": [
{
"type": "<string>",
"name": "<string>",
"description": "<string>",
"system_prompt": "<string>",
"examples": [
"<string>"
]
}
],
"created_by_user_id": "<string>"
}
Body
application/json
Response
201
application/json
Successful Response
The response is of type object
.
{
"ai_agent_id": "<string>",
"agent_name": "<string>",
"language_code": "en-US",
"llm": {
"llm_id": "<string>",
"llm_type": "<string>",
"model_provider": "openai",
"model_name": "<string>",
"model_temperature": 0,
"llm_name": "<string>",
"llm_description": "<string>",
"base_url": "<string>",
"api_key": "<string>",
"max_tokens": 123,
"required_dynamic_data": [
"<string>"
],
"system_prompt": "<string>",
"tools": [
{}
]
},
"stt": {
"provider": "<string>",
"model": "nova-2-general"
},
"tts": {
"provider": "<string>",
"voice_id": "<string>",
"voice_name": "<string>",
"model_name": "eleven_turbo_v2_5",
"voice_temperature": 0.5
},
"knowledge_base_id": "<string>",
"enable_user_interruptions": true,
"minimum_speech_duration_for_interruptions": 0.5,
"minimum_words_before_interruption": 0,
"wait_time_before_detecting_end_of_speech": 0.5,
"ambient_sound": "none",
"ambient_sound_volume": 1,
"webhook_url": "<string>",
"end_call_after_silence_seconds": 10,
"max_call_duration_seconds": 1800,
"welcome_message": "<string>",
"voicemail_detection_timeout_seconds": 90,
"dynamic_data_config": [
{
"url": "<string>",
"method": "<string>",
"timeout": 123,
"headers": {},
"body": {},
"query": {},
"cache": true,
"response_data": [
{
"name": "<string>",
"data": "<string>",
"context": "<string>"
}
]
}
],
"post_call_analysis": [
{
"type": "<string>",
"name": "<string>",
"description": "<string>",
"system_prompt": "<string>",
"examples": [
"<string>"
]
}
],
"created_by_user_id": "<string>"
}