curl --request GET \
--url https://api.pyai.com/v1/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pyai.com/v1/agents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pyai.com/v1/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pyai.com/v1/agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pyai.com/v1/agents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pyai.com/v1/agents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "agent",
"agent_id": "agent_7f3a0b12",
"name": "<string>",
"persona_system_prompt": "<string>",
"greeting": "<string>",
"greeting_variants": [
"<string>"
],
"voice_id": "<string>",
"voice_instruct": "<string>",
"brain_model": "default",
"barge_sensitivity": "<string>",
"ack_mode": "<string>",
"idle_check_in": "auto",
"persona_perspective": "agent",
"mode": "default",
"role": "<string>",
"continuity": true,
"recordings_enabled": true,
"consent_line": "<string>",
"language": "en",
"vocabulary": [
"<string>"
],
"keyterms": [
"<string>"
],
"goals": [
"<string>"
],
"metadata": {},
"extraction_schema": {},
"extraction_webhook_url": "<string>",
"tools": [
{
"tool_id": "<string>",
"enabled": true,
"config": {},
"name": "<string>",
"description": "<string>",
"input_schema": {},
"execution": "hosted"
}
],
"created_at": 123
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}Get an agent
curl --request GET \
--url https://api.pyai.com/v1/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pyai.com/v1/agents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pyai.com/v1/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pyai.com/v1/agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pyai.com/v1/agents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pyai.com/v1/agents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "agent",
"agent_id": "agent_7f3a0b12",
"name": "<string>",
"persona_system_prompt": "<string>",
"greeting": "<string>",
"greeting_variants": [
"<string>"
],
"voice_id": "<string>",
"voice_instruct": "<string>",
"brain_model": "default",
"barge_sensitivity": "<string>",
"ack_mode": "<string>",
"idle_check_in": "auto",
"persona_perspective": "agent",
"mode": "default",
"role": "<string>",
"continuity": true,
"recordings_enabled": true,
"consent_line": "<string>",
"language": "en",
"vocabulary": [
"<string>"
],
"keyterms": [
"<string>"
],
"goals": [
"<string>"
],
"metadata": {},
"extraction_schema": {},
"extraction_webhook_url": "<string>",
"tools": [
{
"tool_id": "<string>",
"enabled": true,
"config": {},
"name": "<string>",
"description": "<string>",
"input_schema": {},
"execution": "hosted"
}
],
"created_at": 123
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}Authorizations
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Path Parameters
Agent id, e.g. agent_7f3a….
Response
Agent
"agent"
"agent_7f3a0b12"
15Effective TTS delivery direction for instruct-capable voice tiers. Renders PyAI's natural conversational pace when no override is stored.
"default"
Idle check-in patience. Renders auto when unset, except support agents render patient.
auto, patient, off Which side of the call the persona is on. Renders the effective default (agent) when unset.
agent, caller Read-only runtime mode derived from the agent's role (default, receptionist, sales, or collections). Set indirectly via the writable role field.
default, receptionist, sales, collections "default"
Role archetype the agent runs as, or null. Writable on create and update.
Whether this agent reuses a prior-call caller card when a caller key is available. Default false.
Session language for this agent's calls. Renders the effective default (en) when unset.
en, fr, es, de, hi Sanitized Agent vocabulary. An empty list means speech-recognition biasing is off.
54 - 64Show child attributes
Show child attributes
Post-call extraction JSON Schema, or null.
Signed delivery target for post-call extraction, or null.
Show child attributes
Show child attributes
Unix seconds.