---
title: GET /agent/whoami
description: "Identify the caller, tier, and quota"
full: true
---

**Auth:** optional. The route accepts anonymous calls; send an `ivy_` API key (`Authorization: Bearer ivy_…` or `X-Ivy-Api-Key`) or a Clerk session JWT (`Authorization: Bearer …`) to call as your own account. See [Authentication](/docs/api/authentication).

Single source of truth for an agent to learn its credential type, tier, quota, and tool restrictions in one call. Public — anonymous callers get a downgraded response describing the guest tier.

## Responses

### `200` OK

Caller identity + quota

Response shape: `object`

**curl**

```bash
curl -X GET 'https://ivybiosciences.com/api/v1/agent/whoami' \
  -H "Authorization: Bearer $IVY_API_KEY"
```

**JavaScript**

```js
const res = await fetch('https://ivybiosciences.com/api/v1/agent/whoami', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.IVY_API_KEY}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os, requests

res = requests.get(
    "https://ivybiosciences.com/api/v1/agent/whoami",
    headers={"Authorization": f"Bearer {os.environ['IVY_API_KEY']}"},
)
data = res.json()
```
