Create Agent
Creates a new Play.ai Agent.
Use this endpoint to create new agents. Required parameters include the agent’s name and the agent’s prompt.
After you create your agent, you can proceed to start a conversation using our Websocket API, or you can try it
out through our web interface at https://play.ai/agent/<your-agent-id>
.
To update the agents see the Update Agent endpoint.
Authorizations
Your secret API key from PlayAI, formatted as Bearer YOUR_SECRET_API_KEY
.
Headers
application/json
application/json
Body
The unique ID for a PlayAI Voice.
"s3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json"
The agent's name
250
"My Agent"
The agent's description
500
"My agent is the best agent"
The voice speed, i.e. how fast is the agent's speech.
0.5 <= x <= 1.5
1.2
The voice model to use for the agent's speech.
PlayHT2.0-turbo
, Play3.0-mini
, PlayDialog
"PlayHT2.0-turbo"
The greeting message for the agent
250
"Hello! How can I help you today?"
Instructions for the agent
10000
"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"
The agent's critical knowledge
20000
"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."
If true, the agent will only respond with information from the critical knowledge field.
The visibility of the agent
public
, private
The language of the agent
arabic
, english
, french
, german
, greek
, hindi
, italian
, japanese
, korean
, malay
, mandarin
, polish
, portuguese
, russian
, spanish
, thai
, turkish
"english"
Leave this field out or null
if you don't want the agent to use your custom LLM API.
The unique ID for each action.
Response
The unique ID for each agent.
"f0gZrOKBKL7veJ6o1M"
The unique ID for a PlayAI Voice.
"s3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json"
The agent's name
250
"My Agent"
The agent's description
500
"My agent is the best agent"
If true, the agent will only respond with information from the critical knowledge field.
The visibility of the agent
public
, private
The voice speed, i.e. how fast is the agent's speech.
0.5 <= x <= 1.5
1.2
The voice model to use for the agent's speech.
PlayHT2.0-turbo
, Play3.0-mini
, PlayDialog
"PlayHT2.0-turbo"
The greeting message for the agent
250
"Hello! How can I help you today?"
Instructions for the agent
10000
"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"
The agent's critical knowledge
20000
"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."
The language of the agent
arabic
, english
, french
, german
, greek
, hindi
, italian
, japanese
, korean
, malay
, mandarin
, polish
, portuguese
, russian
, spanish
, thai
, turkish
"english"
Leave this field out or null
if you don't want the agent to use your custom LLM API.
The URL of the agent's avatar photo
"https://api.play.ai/api/v1/agents/as43.../avatar-photo"
The unique ID for each action.
Was this page helpful?