# List versions and LLMs

From the Lero API docs: https://lero.studio/docs/en#agentes. Everything in one file: https://lero.studio/docs/en/llms-full.txt.

`GET /v1/agents`

Conversational Agent discovery: the agent versions your key can use, the LLMs, the voices and the recommended setup. Call it before opening a call: the list changes. Free.

Authentication: key.

Responses:

- `200`: The current options.
- `401`: `sem_chave`
- `401`: `chave_invalida`
- `401`: `chave_vencida`

cURL:

```bash
curl "https://app.lero.studio/api/v1/agents" \
  -H "Authorization: Bearer $LERO_API_KEY"
```

Python:

```python
import os

import requests

r = requests.get(
    "https://app.lero.studio/api/v1/agents",
    headers={"Authorization": f"Bearer {os.environ['LERO_API_KEY']}"},
    timeout=30,
)
r.raise_for_status()
print(r.json())
```

JavaScript:

```javascript
const res = await fetch("https://app.lero.studio/api/v1/agents", {
  headers: { "Authorization": `Bearer ${process.env.LERO_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.erro}`);
console.log(data);
```

Response (200):

```json
{
  "ligado": true,
  "recomendado": {
    "versao": "v0.4",
    "llm": "oss120b",
    "voz": "rio"
  },
  "versoes": [
    {
      "id": "v0.4",
      "nome": "Agente v0.4",
      "lingua": "pt",
      "vozes": true
    }
  ],
  "llms": [
    {
      "id": "oss120b",
      "nome": "..."
    }
  ],
  "vozes": [
    "rio",
    "sp",
    "niteroi"
  ]
}
```
