# Key introspection

GET /v1/key - what the routing key in the Authorization header can do, without dashboard access.

*ProxyLLM docs · https://proxyllm.ai/docs/api/key*

```
GET /v1/key
```

Auth: **[routing key](/docs/api/authentication)** (`pllm_…`) - the key introspects itself. Built for automated agents that need to confirm what a key routes to (a Codex subscription or plain API keys), which models it can reach, and how much budget is left. Never returns credential secrets.

```bash
curl https://api.proxyllm.ai/v1/key \
  -H "Authorization: Bearer pllm_your_routing_key"
```

## Response

```json
{
  "object": "routing_key",
  "id": "5e2f8c1a-...",
  "mode": "fallback",
  "revoked": false,
  "codex_hosted": true,
  "default_provider": "codex",
  "lanes": [
    {
      "position": 1,
      "provider": "codex",
      "model": null,
      "backed_by": "codex_subscription",
      "connected": true,
      "account_email": "you@example.com",
      "models": ["flagship", "mini"]
    },
    {
      "position": 2,
      "provider": "bridge",
      "model": "claude-code",
      "backed_by": "claude_code_bridge",
      "bridge_bound": true,
      "models": ["bridge/claude-code"]
    },
    {
      "position": 3,
      "provider": "openai",
      "model": "gpt-4o-mini",
      "backed_by": "api_key",
      "credential_bound": true,
      "models": ["gpt-5", "gpt-5-mini", "gpt-4o", "gpt-4o-mini"]
    }
  ],
  "budget": {
    "monthly_usd": 50,
    "spent_usd": 12.4,
    "remaining_usd": 37.6,
    "over_budget": false
  }
}
```

Field notes:

- `codex_hosted` - true when any lane routes to a Codex subscription.
- `default_provider` - the first lane in fallback mode; `null` in classifier mode, where the lane is chosen per request.
- Per-lane flags name what makes the lane servable: `connected` (Codex session live), `bridge_bound` (bridge URL and token stored), `credential_bound` (provider key saved).
- `budget.monthly_usd` and `remaining_usd` are `null` when the key has no budget.

## Errors

| Status | Code              | When                            |
| ------ | ----------------- | ------------------------------- |
| 401    | `signup_required` | No key sent.                    |
| 401    | `invalid_api_key` | Unknown or revoked routing key. |
| 405    | (none)            | Method other than GET.          |
