POST /agent-playground-completion/{agent_id}
Changed onStateless playground completion. Send the full conversation history (same shape as chat completion messages) and receive only the newly generated messages. Nothing is persisted server-side — the caller manages conversation state.
Request
- Base URLhttps://api.retellai.com
- AuthHTTP bearer
Path parameters
Unique id of the agent.
Query parameters
Agent version to use. Defaults to latest.
Request body
Example request
{
"messages": [
{
"role": "user",
"content": "Hi, I'd like to check my appointment."
},
{
"role": "agent",
"content": "Sure! Could you please provide your name?"
},
{
"role": "user",
"content": "My name is John Smith."
}
],
"dynamic_variables": {
"customer_name": "John Smith",
"customer_phone": "444-223-3564"
},
"current_state": "greeting",
"current_node_id": "start-node-abc123",
"component_id": "component_xyz789"
}Response
Successfully generated playground completion.
Example response
{
"messages": [
{
"message_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"role": "agent",
"content": "hi how are you doing?",
"created_timestamp": 1703302428855
}
],
"current_state": "greeting",
"current_node_id": "node_abc123",
"dynamic_variables": {
"customer_name": "John Doe"
},
"knowledge_base_retrieved_contents": [
"Our business hours are Monday through Friday, 9am to 5pm."
]
}Changes
- breaking
removed
subschema #1subschema #2from the//request propertyoneOflist - breaking
added to the
/response propertyoneOflist for the response status - info
added the new optional request property
////// - info
added the new optional request property
////// - info
added to the
/request propertyoneOflist - info
added
subschema #1subschema #2to the//request propertyoneOflist - info
added the optional property
//////////to the response with the status - info
added the optional property
//////////to the response with the status
- breaking
- info
queryrequest parameterversionlist-of-types was widened by adding typesstring - info
for the
queryrequest parameterversion, the type was generalized fromintegerto no type
- info