For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Connect
BlogHelp CenterAPI PricingSign up
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
  • API reference
    • Introduction
    • Authentication
    • Streaming
  • ElevenAgents
      • POSTCreate agent
      • GETGet agent
      • GETList agents
      • PATCHUpdate agent
      • DELDelete agent
      • POSTDuplicate agent
      • GETGet link
      • POSTSimulate conversation
      • POSTStream simulate conversation
      • POSTCalculate expected LLM usage
      • GETGet agent summaries
  • ElevenAPI
  • ElevenCreative
  • Core Resources
  • Workspace
  • Legacy
LogoLogo
Login
Login
Connect
BlogHelp CenterAPI PricingSign up
ElevenAgentsAgents

Stream simulate conversation

POST
/v1/convai/agents/:agent_id/simulate-conversation/stream
POST
/v1/convai/agents/:agent_id/simulate-conversation/stream
$curl -X POST https://api.elevenlabs.io/v1/convai/agents/agent_id/simulate-conversation/stream \
> -H "Content-Type: application/json" \
> -d '{
> "simulation_specification": {
> "simulated_user_config": {
> "first_message": "Hello, how can I help you today?",
> "language": "en",
> "disable_first_message_interruptions": false
> }
> }
>}'
1{}
Run a conversation between the agent and a simulated user and stream back the response. Response is streamed back as partial lists of messages that should be concatenated and once the conversation has complete a single final message with the conversation analysis will be sent.
Was this page helpful?
Previous

Calculate expected LLM usage

Next
Built with

Path parameters

agent_idstringRequired
The id of an agent. This is returned on agent creation.

Headers

xi-api-keystringOptional

Request

This endpoint expects an object.
simulation_specificationobjectRequired
A specification detailing how the conversation should be simulated
extra_evaluation_criterialist of objects or nullOptional
A list of evaluation criteria to test
new_turns_limitintegerOptionalDefaults to 10000
Maximum number of new turns to generate in the conversation simulation

Response

Successful Response

Errors

422
Unprocessable Entity Error