GET
/
api
/
v1
/
agents
/
{agentId}
curl --request GET \
  --url https://api.play.ai/api/v1/agents/{agentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-USER-ID: <api-key>'
{
  "id": "f0gZrOKBKL7veJ6o1M",
  "voice": "s3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json",
  "voiceSpeed": 1.2,
  "ttsModel": "PlayHT2.0-turbo",
  "displayName": "My Agent",
  "description": "My agent is the best agent",
  "greeting": "Hello! How can I help you today?",
  "prompt": "You are an agent for a company that sells widgets. A customer calls in and asks about the different types of widgets you sell. You should respond by telling the customer about the different types of widgets you sell and how they differ from each other.\n",
  "criticalKnowledge": "We have been in business for 20 years and have sold over 1 million widgets. Currently, we have 3 types of widgets: the standard widget, the deluxe widget, and the super widget. The standard widget is our most popular widget and is the most affordable. The deluxe widget is our mid-range widget and is popular with customers who want a little more than the standard widget. The super widget is our top of the line widget and is popular with customers who want the best of the best.",
  "answerOnlyFromCriticalKnowledge": false,
  "visibility": "public",
  "language": "english",
  "llm": null,
  "avatarPhotoUrl": "https://api.play.ai/api/v1/agents/as43.../avatar-photo",
  "criticalKnowledgeFiles": [
    {
      "id": "e0e92064e26257fed1477465...",
      "name": "whatever you want.pdf",
      "url": "https://api.play.ai/api/v1/agents/as43.../critical-knowledge-files/e0e92...",
      "size": 108439,
      "type": "pdf"
    }
  ],
  "phoneNumbers": [
    {
      "phoneNumber": 13659874563,
      "country": "US",
      "locality": "Malibu"
    }
  ],
  "actions": [
    "f0gZrOKBKL7veJ6o1M"
  ]
}

Authorizations

Authorization
string
header
required

Your secret API key from PlayAI, formatted as Bearer YOUR_SECRET_API_KEY.

X-USER-ID
string
header
required

Your unique user ID from PlayAI.

Headers

accept
enum<string>
Available options:
application/json

Path Parameters

agentId
string
required

The agent's ID.

Example:

"f0gZrOKBKL7veJ6o1M"

Response

200 - application/json

Agent resource response.

The response is of type object.