Creating an API Key
1
Log In
Sign in to your account at https://a2agent.me/login.
2
Navigate to API Keys
In the console sidebar, click API Keys to open the key management page.
3
Create a New Key
Click Create Key. Optionally enter a descriptive label (for example,
production or dev-laptop) to help you identify the key later.4
Copy the Key Value
The full key is displayed exactly once immediately after creation. Copy it to a secure location such as a password manager or environment variable file. You will not be able to retrieve the full value again after closing this dialog.
5
Note the Base URL
Your base URL is the same for all keys and all models:Save this alongside your key so you can configure clients in one go.
Using Your API Key
Pass your API key in theAuthorization header as a Bearer token on every request.
OpenAI-Compatible Clients
If you use the OpenAI Python or Node.js SDK, set thebase_url (or baseURL) and api_key (or apiKey) constructor arguments, or export the corresponding environment variables:
Anthropic-Compatible Clients
If you use an Anthropic-compatible client — such as Claude Code or any tool that readsANTHROPIC_AUTH_TOKEN — your A2Agent key works there too. Set the following environment variables:
Copying Connection Info
On the API Keys page, each row in the key list has a Copy Connection Info button. Clicking it copies your key name, key value, and base URL together in a single formatted block — handy when configuring AI coding clients or sharing setup instructions with a teammate. You never need to hunt for the base URL separately.Rotating and Revoking Keys
You can delete any API key from the API Keys page at any time. Deletion is immediate — any request using that key will return a401 Unauthorized error after deletion. To rotate a key, create a new one first, update your clients, and then delete the old key once traffic has migrated.
There is no automatic expiry on keys; they remain valid until you delete them.