---
title: "Create and revoke API keys"
description: "Create Autohand API keys in Console for servers, CI jobs, SDK apps, and other coding agents. Keys belong to the selected account, are shown once, and can be revoked at any time."
slug: "console/api-keys"
sidebar:
  label: "API keys"
seo:
  title: "Autohand Console API keys"
  description: "Create an Autohand API key in Console, copy it once, scope it to a personal or Team account, store it as an environment variable, and revoke it when a client is retired."
---

Use an API key when something other than your browser needs to call Autohand: a server, a CI job, an [Agent SDK](/agent-sdk/overview) app, or [another coding agent](/integrations/coding-agents). You manage keys on the [API Keys](https://console.autohand.ai/api-keys) page, under **Configure** in the Console sidebar.

<img className="ah-shot-light" src="/images/console/api-keys-light.webp" alt="Autohand Console API Keys page with Total Keys, Active Keys, and Last Used cards and a Keys table listing ci-release-check and production-reviewer as active" width="2880" height="1800" loading="lazy" />
<img className="ah-shot-dark" src="/images/console/api-keys-dark.webp" alt="Autohand Console API Keys page with Total Keys, Active Keys, and Last Used cards and a Keys table listing ci-release-check and production-reviewer as active" width="2880" height="1800" loading="lazy" />

API Keys with two active keys. The page shows totals at the top and one row per key with its ID, name, created date, key prefix, status, and a Revoke action. Demo data.

## How keys are scoped [#scope]

A key belongs to the account that is selected in the account switcher when you create it. A key created on your personal account uses your plan. A key created while a Team account is selected uses the Team account. Check the account switcher at the top right before you create a key.

Give each client or environment its own key. Then you can revoke one without interrupting the others.

## Create a key [#create]

1. Open **API Keys** in the sidebar.
2. Select **Create API Key**.
3. Under **Name**, enter a name you will recognize for the client or environment, such as `production-reviewer` or `ci-release-check`.
4. Select **Create Key**.
5. When **API key created** appears, select **Copy key** and store the value right away. It is only shown once.
6. Close the dialog. The key now appears in the **Keys** table as **active**.

<img className="ah-shot-light" src="/images/console/api-keys-create-light.webp" alt="Create API Key dialog with the note Save the key immediately. It is only shown once, a Name field filled with ci-release-check, and Cancel and Create Key buttons" width="2880" height="1800" loading="lazy" />
<img className="ah-shot-dark" src="/images/console/api-keys-create-dark.webp" alt="Create API Key dialog with the note Save the key immediately. It is only shown once, a Name field filled with ci-release-check, and Cancel and Create Key buttons" width="2880" height="1800" loading="lazy" />

The Create API Key dialog. The raw key appears in this dialog once, after you select Create Key. Demo data.

You can also start from **Create API key** on the Overview page or on Get Started. Both open the same flow.

## Store the key safely [#store]

- Put the key in a server-side secret manager or in the environment of the process that uses it, for example `AUTOHAND_API_KEY`.
- Never put a key in browser code, commits, screenshots, tickets, or logs.
- If a key may have leaked, revoke it and create a new one.

Continue with [the SDK API-key tutorial](/agent-sdk/api-key-setup) for a working TypeScript service, or [use Autohand models in another coding agent](/integrations/coding-agents).

## Read the Keys table [#table]

| Column | What it shows |
| --- | --- |
| **API ID** | The key's identifier. |
| **Name** | The name you gave the key. |
| **Created** | When the key was created and when it was last used. |
| **Key** | The key prefix. The full value is never shown again after creation. |
| **Status** | Whether the key is active. |
| **Action** | **Revoke**. |

The cards above the table show **Total Keys**, **Active Keys**, and when any key was **Last Used**.

The Playground creates a key named **Playground** for each account the first time you use it, so its SDK examples have a key to read. It appears in this table and can be revoked like any other. See [the Playground API key](/console/playground#playground-key).

## Revoke a key [#revoke]

Revoking a key immediately removes access for every client that uses it. If the client is still in use, create its replacement first and update the client, then revoke the old key.

1. Find the key in the **Keys** table.
2. Select **Revoke**.
3. Check the key name in the **Revoke API Key** dialog.
4. Select **Revoke Key**.

<img className="ah-shot-light" src="/images/console/api-keys-revoke-light.webp" alt="Revoke API Key dialog warning that revoking immediately removes access for clients using this key, with Cancel and Revoke Key buttons" width="2880" height="1800" loading="lazy" />
<img className="ah-shot-dark" src="/images/console/api-keys-revoke-dark.webp" alt="Revoke API Key dialog warning that revoking immediately removes access for clients using this key, with Cancel and Revoke Key buttons" width="2880" height="1800" loading="lazy" />

The Revoke API Key dialog names the key before you confirm. Demo data.

## Troubleshooting [#troubleshooting]

| Symptom | What to check |
| --- | --- |
| I closed the dialog before copying the key | The raw value cannot be shown again. Revoke that key and create a new one. |
| A request is rejected with the new key | Confirm the key is **active**, that it was created on the account you expect, and that the process actually reads the environment variable. |
| A model is not available with this key | Keys use the plan of the account they belong to. See [Models in the Console](/console/models). |
