Skip to content
Esc
↑↓navigate↵open⌘Jpreview
Start
On this page

Create and revoke API keys

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.

Use an API key when something other than your browser needs to call Autohand: a server, a CI job, an Agent SDK app, or another coding agent. You manage keys on the API Keys page, under Configure in the Console sidebar.

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 activeAutohand 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
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

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

  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.
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 buttonsCreate 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
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

  • 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 for a working TypeScript service, or use Autohand models in another coding agent.

Read the Keys 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.

Revoke a key

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.
Revoke API Key dialog warning that revoking immediately removes access for clients using this key, with Cancel and Revoke Key buttonsRevoke API Key dialog warning that revoking immediately removes access for clients using this key, with Cancel and Revoke Key buttons
The Revoke API Key dialog names the key before you confirm. Demo data.

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.

Last updated on

Was this helpful?

Send Feedback

Help us improve this documentation page. Your feedback is valuable.

We'll only contact you if we need clarification