---
title: "List agent keys"
method: GET
path: "/v1/agents/{id}/keys"
tags: ["Agents"]
---

# List agent keys

`GET /v1/agents/{id}/keys`

Key metadata for this agent, never the secret. Agent keys cannot call this.

## Path parameters

- `id` string, required

## Headers

- `X-API-Key` string

## Response `200`

- AgentKeyResponseDto[]
  - `id` string, required
  - `agentId` string, required
  - `name` string, required
  - `keyHint` string, required — Last 4 characters of the secret
  - `status` 'ACTIVE' | 'REVOKED' | 'EXPIRED', required
  - `createdAt` string, date-time, required
  - `expiresAt` string, date-time, nullable, required
  - `lastUsedAt` string, date-time, nullable, required
  - `secret` string — Full API key. Present only in the create response. Prefix sk_live_agent_ (production) or sk_sandbox_agent_ (sandbox).

## Other responses

- `401` — Unauthorized - Invalid or missing authentication credentials

## Changes

- **2026-09-23** `da62fa03793e` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/infinite/apis/infinite-api/changes/v1/agents/:id/keys/get.md)

---

[API](https://skmtc.dev/infinite/apis/infinite-api.md) · [All operations](https://skmtc.dev/infinite/apis/infinite-api/llms.txt) · [OpenAPI document](https://skmtc.dev/infinite/apis/infinite-api/revisions/0b0a3231b482?raw)
