---
title: "Retrieve an API key"
method: GET
path: "/v2/api-keys/{api_key_id}"
tags: ["API keys"]
---

# Retrieve an API key

`GET /v2/api-keys/{api_key_id}`

Retrieves the metadata for an existing API key by its unique identifier. The raw secret is never returned — only `token_prefix`, `permission_mode`, `project_scope`, and lifecycle fields.

## Path parameters

- `api_key_id` string, required

## Query parameters

- `include_budget` boolean

## Response `200`

API key retrieved successfully.

- ApiKeyRestResponse
  - `id` string, required
  - `name` string, required
  - `workspace_id` string, required
  - `token` string, required — Raw on create/retrieve and masked in list responses.
  - `active` boolean
  - `is_legacy` boolean
  - `source` string
  - `budget` object
  - `expiration` string, date-time
  - `projects` string[]
  - `created_by_id` string, nullable
  - `updated_by_id` string, nullable
  - `created` string, date-time
  - `updated` string, date-time
  - `consumption` number
  - `token_consumption` number
  - `requests_per_minute_consumption` number
  - `owner` object
  - `project_scope` object
  - `permission_mode` string
  - `access` object
  - `token_prefix` string
  - `status` string
  - `constraints` object
  - `mcp_access` object
  - `legacy_token_family` string
  - `legacy_key_id` string
  - `last_used_at` string, date-time

## Changes

> 254 revisions in range; 71 not diffed.

- **2026-08-02** `6f132f005b2a` — 1 warning
  - removed the optional property `api_key/allOf[#/components/schemas/ApiKey]/mcp_access` from the response with the `200` status
- **2026-07-31** `3128fb112d66` — 1 info
  - added the optional property `api_key/allOf[#/components/schemas/ApiKey]/mcp_access` to the response with the `200` status
- **2026-07-30** `d1ae9e3491f7` — 1 warning
  - removed the optional property `api_key/allOf[#/components/schemas/ApiKey]/mcp_access` from the response with the `200` status
- **2026-07-29** `81dd5e8c8ae5` — 1 info
  - added the optional property `api_key/allOf[#/components/schemas/ApiKey]/mcp_access` to the response with the `200` status
- **2026-07-29** `c165184caee5` — 1 warning
  - removed the optional property `api_key/allOf[#/components/schemas/ApiKey]/mcp_access` from the response with the `200` status

[Full history](https://skmtc.dev/orq-ai/apis/orq-ai-api/changes/v2/api-keys/:api_key_id/get.md)

---

[API](https://skmtc.dev/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.dev/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/orq-ai/orq-ai-api/revisions/b22330eb2d5a/schema)
