apicheats.dev elevenlabs/llms.txt Raw .md
GET

/v1/convai/test-invocations

ElevenLabs API

List Test Invocations

Base URL
https://api.elevenlabs.io
Auth
xi-api-key: <ELEVENLABS_API_KEY>
Last verified
2026-09-03 · upstream hash matched
Actions
Agents: curl -H "Accept: text/markdown" this URL
→ 212 tokens · Vary: Accept

Critical gotchas

Authentication uses the non-standard xi-api-key header, not Authorization: Bearer. Sending a Bearer token returns HTTP 401.

Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (--output speech.mp3) rather than parsing it.

cURL

curl -X GET 'https://api.elevenlabs.io/v1/convai/test-invocations?agent_id=agent-id&page_size=30&cursor=example-cursor' \  -H "xi-api-key: $ELEVENLABS_API_KEY"
Get a free ElevenLabs API key → sponsored

Parameters

Name In Type Required Description
agent_id query string No Filter by agent ID
page_size query integer No How many Tests to return at maximum. Can not exceed 100, defaults to 30.
cursor query string No Used for fetching next page. Cursor is returned in the response.

Response 200 OK

{
  "meta": {
    "total": 0,
    "page": 0,
    "page_size": 0
  },
  "results": [
    {
      "id": "string",
      "agent_id": "string",
      "branch_id": "string",
      "created_at_unix_secs": 0,
      "test_run_count": 0,
      "passed_count": 0,
      "failed_count": 0,
      "pending_count": 0,
      "title": "string",
      "access_info": {
        "access_source": "creator",
        "creator_email": "john.doe@example.com",
        "creator_name": "John Doe",
        "is_creator": true,
        "role": "admin"
      },
      "repeat_count": 1
    }
  ],
  "next_cursor": "string",
  "has_more": true
}