---
title: "API keys"
description: "Issue, grant, rotate and revoke the Workspace API key your code authenticates with."
---

> Documentation Index
> Fetch the complete documentation index at: https://help.airuntime.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API keys

A Workspace API key is the only credential your code sends to the Gateway. It authenticates a
Workspace and a caller; it never carries provider credentials.

## What a key is

- **One Workspace.** The key can only reach Pools in the Workspace that issued it.
- **One Environment.** `production` or `development`. A development key is not accepted for
  production traffic.
- **A `runtime` scope.** The key calls the model interfaces, nothing else.
- **Pool grants.** The key may only call the Pools you explicitly grant it.
- **An optional per-key rate limit**, when one caller should be constrained below the Pool limit.

The secret is shown once, when you issue it, and starts with `rk_`. Store it in a secret manager;
the console, the CLI and the API never display it again.

## Issue

Open **API keys**, choose the Environment, grant the Pools, and copy the secret once. In the CLI:

```bash
airuntime api-keys issue --workspace ws_1 --label checkout --pool pool_1
```

## Rotate

Rotation replaces the secret and keeps the key's Environment, scope, Pool grants and rate limit, so
you can roll a leaked credential without re-planning access:

```bash
airuntime api-keys rotate --workspace ws_1 --key key_1
```

## Revoke

Revocation takes effect immediately. There is no grace period, and requests already in flight are
not credited back:

```bash
airuntime api-keys revoke --workspace ws_1 --key key_1
```

## Watch usage

Each key records a last-used time, and every request it makes appears in **Requests** with the key
it used. That is the fastest way to find the caller behind unexpected spend or a failing Pool.

Source: https://help.airuntime.dev/gateway/api-keys/index.mdx
