---
title: "Get Keys"
method: GET
path: "/v1/keys"
tags: ["Keys"]
---

# Get Keys

`GET /v1/keys`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

Get all your keys.

Omit `status` to list every key. Use `active`, `expired`, or `revoked` to filter.

## Query parameters

- `offset` integer: Number of keys to skip.
- `limit` integer: Maximum number of keys to return.
- `sort_by` 'id' | 'name' | 'created'
- `sort_order` 'asc' | 'desc'
- `status` 'active' | 'expired' | 'revoked'

## Response `200`

Successful Response

- KeysResponse
  - `object` 'list': Type of the object.
  - `total` integer, required: Total number of keys.
  - `offset` integer, required: Offset of the keys list.
  - `limit` integer, required: Limit of the keys list.
  - `data` KeyResponse[], required: List of keys.
    - `object` 'key': Type of the object.
    - `id` integer, required: ID of the key.
    - `name` string, required: Name of the key.
    - `value` string, required: Value of the key.
    - `user_id` integer, required: ID of the user that owns the key.
    - `expires` integer, nullable: Time of expiration, as Unix timestamp. If None, the key never expires.
    - `created` integer, required: Time of creation, as Unix timestamp.
    - `revoked` boolean, required: Whether the key has been revoked.

## Other responses

- `401`: Invalid authentication scheme.<br>Invalid API key.
- `403`: Your account has expired. Please contact support to renew your account.
- `422`: Validation Error

## Changes

- **2026-09-29** `2f7a4a0aac8f`: 1 info
  - endpoint added
- **2026-09-29** `da70d9cd1957`: 1 breaking
  - api path removed without deprecation
- **2026-09-28** `87472bc2094f`: 2 info
  - added the new optional `query` request parameter `status`
  - added the required property `data/items/revoked` to the response with the `200` status
- **2026-09-21** `5fdbd3614b8c`: 1 breaking, 1 info
  - removed the required property `data/items/user` from the response with the `200` status
  - added the required property `data/items/user_id` to the response with the `200` status
- **2026-08-27** `1627e468291c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/betagouv/apis/opengatellm/changes/v1/keys/get.md)

---

[API](https://skmtc.dev/betagouv/apis/opengatellm.md) - [All operations](https://skmtc.dev/betagouv/apis/opengatellm/llms.txt) - [OpenAPI document](https://skmtc.dev/betagouv/apis/opengatellm/revisions/2f7a4a0aac8f?raw)
