---
title: "List the AI Gateway keys of a project"
method: GET
path: "/project/{project}/ai-gateway/keys"
tags: ["AIGateway"]
---

# List the AI Gateway keys of a project

`GET /project/{project}/ai-gateway/keys`

## Request

- Base URL: `https://api.aiven.io/v1`
- URL: `https://api.aiven.io/v1/project/{project}/ai-gateway/keys`
- Auth: HTTP bearer and OAuth 2
  - Authorization code: `https://console.aiven.io/oauth/authorize`
  - Token URL: `https://api.aiven.io/v1/oauth2/token` scopes: `projects:read`

> This endpoint **may be changed or removed at any time**. Don't use it in production environments.

Expired keys are not listed, unless `include_expired` is set. Revoked keys are not listed, unless `include_revoked` is set. Keys are listed newest first and one page at a time; follow `next` until it comes back null to read the whole list.

## Path parameters

- `project` string, required

## Query parameters

- `include_revoked` boolean
- `include_expired` boolean
- `cursor` string
- `limit` integer
- `order_by` 'asc' | 'desc'

## Response `200`

Response

- AIGatewayKeyListResponse: AIGatewayKeyListResponse
  - `first` string: First page
  - `keys` object[], required: List of AI Gateway keys
    - `create_time` string, required: Time the key was created
    - `description` string: Longer description on how the key is used
    - `expiry_time` string: Time the key expires
    - `key_id` string, required: Key ID
    - `key_suffix` string, required: Last characters of the key
    - `name` string, required: Short human readable identifier for the key
    - `revocation_time` string: Time the key was revoked
  - `last` string: Last page
  - `next` string: Next page
  - `prev` string: Previous page

## Other responses

- `400`: The cursor, limit or order_by is not valid
- `403`: AI Gateway is not enabled for this organization
- `503`: AI Gateway keys are unavailable

## Changes

- **2026-10-14** `890113a87c87`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/aiven/apis/aiven-api-documentation/changes/project/:project/ai-gateway/keys/get.md)

---

[API](https://skmtc.dev/aiven/apis/aiven-api-documentation.md) - [All operations](https://skmtc.dev/aiven/apis/aiven-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/aiven/apis/aiven-api-documentation/revisions/b5ff8f3e4299?raw)
