# GET /v1/convai/agents (ElevenLabs API)
Base URL: https://api.elevenlabs.io
Auth: xi-api-key: <ELEVENLABS_API_KEY>
Last verified: 2026-09-03

> List Agents

## 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/agents?page_size=30&search=example-search&archived=false&show_only_owned_agents=false&created_by_user_id=created-by-user-id&tags=example&sort_direction=asc&sort_by=name&cursor=example-cursor' \
  -H "xi-api-key: $ELEVENLABS_API_KEY"

## Parameters
| Name | In | Type | Required | Description |
| :--- | :--- | :--- | :--- | :--- |
| page_size | query | integer | No | How many Agents to return at maximum. Can not exceed 100,... |
| search | query | string | No | Search by agents name. |
| archived | query | boolean | No | Filter agents by archived status |
| show_only_owned_agents | query | boolean | No | If set to true, the endpoint will omit any agents that we... |

## Response (200 OK)
{"agents":[{}],"has_more":false}

---
Need an API key? Get one at https://elevenlabs.io/app/sign-up