Endpoint:

GET /v3/agents/

Description:

Retrieves all agents associated with a given API key. This is useful for managing multiple agents and checking their configurations.

Request Headers:

HeaderTypeRequiredDescription
x-api-keyStringYesAPI key for authentication
acceptStringYesExpected response format (application/json)

Request Example (cURL):

curl -X GET "https://agent-prod.studio.lyzr.ai/v3/agents/" ^
     -H "accept: application/json" ^
     -H "x-api-key: sk-default-XXXXXXX"

Request Example (Python):

import requests

url = "https://agent-prod.studio.lyzr.ai/v3/agents/"
headers = {
    "accept": "application/json",
    "x-api-key": "sk-default-XXXXXXX"
}

response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())  # Print response data

Response:

{
  "agents": [
    {
      "id": "12345",
      "name": "Finance Advisor",
      "description": "Personalized Financial Planning Assistant"
    }
  ]
}