---
title: "Info Key Fn"
method: GET
path: "/key/info"
tags: ["key management"]
---

# Info Key Fn

`GET /key/info`

Retrieve information about a key.

Parameters:
- key: str | None (query parameter) - The key to look up. Accepts the plaintext key or its hash;
  prefer the hash, since a query parameter is recorded verbatim by any HTTP access log in front
  of the proxy. Defaults to the key in the Authorization header.

Returns:
- key: str - The key that was looked up, echoed back as it was passed in
- info: dict - The key's row, minus the hashed token
    - key_alias: str | None - User-friendly key alias
    - spend: float - Amount spent by the key. When budget_duration is set this covers only the
      current budget window, not the key's lifetime
    - max_budget: float | None - Max budget for the key, enforced against spend
    - budget_duration: str | None - Budget reset period ("30d", "1h", etc.)
    - budget_reset_at: datetime | None - When the current budget window ends and spend is next
      reset to 0, not when it was last reset. Reset times snap to standard boundaries in the
      configured timezone (30d and 1mo land on the 1st of the month, 7d on Monday, 1h on the
      hour), so subtracting budget_duration from it does not give the window's start
    - model_max_budget: dict - Per-model budgets, e.g. {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}}
    - model_max_budget_usage: dict | None - Current-window spend per model, present only when
      the key has per-model budgets
    - budget_limits: list | None - Concurrent budget windows, exactly as stored
    - budget_limits_usage: dict | None - Current-window spend per budget window, e.g.
      {"1h": {"current_spend": 0.0009}}, present only when the key has budget windows
      (read from the same cross-pod spend counter the budget enforcement uses)
    - models: list - Model_name's the key is allowed to call
    - tpm_limit / rpm_limit: int | None - Tokens and requests per minute limits
    - metadata: dict - Metadata for the key, e.g. {"team": "core-infra"}
    - blocked: bool | None - Whether the key is blocked
    - expires: datetime | None - When the key stops authenticating requests
    - last_active: datetime | None - When the key was last used
    - object_permission: dict | None - Resolved vector store / MCP permissions when the key has
      an object_permission_id

Example Curl:
```
curl -X GET "http://0.0.0.0:4000/key/info?key=d5345c0ecc68ae6295c69f91926b2bd379e25481a40c34b5884d157a9f65d8fa" -H "Authorization: Bearer sk-1234"
```

Example Curl - if no key is passed, it will use the Key Passed in Authorization Header
```
curl -X GET "http://0.0.0.0:4000/key/info" -H "Authorization: Bearer sk-test-example-key-123"
```

## Query parameters

- `key` string, nullable — Key to look up. Pass the key's sha256 hash so the raw key stays out of URLs and access logs. Example key='d5345c0ecc68ae6295c69f91926b2bd379e25481a40c34b5884d157a9f65d8fa'

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-18** `082b5fabd909` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Change history](https://skmtc.dev/flock/apis/litellm-api/changes/key/info/get.md)

---

[API](https://skmtc.dev/flock/apis/litellm-api.md) · [All operations](https://skmtc.dev/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flock/apis/litellm-api/revisions/731afbea6a1b?raw)
