API Keys
Create API keys for the Platform API, set them up on their own page, let them expire, deactivate and revoke them.
API keys authenticate your requests to the Platform API. Each key belongs to your workspace and is paid from its balance.
Create a key
Open API Keys and click Add API key. Enter a name that says what the key is for, for example backend-production, data-pipeline or dev.
The dialog also has GDPR-compliant models only, switched on. Everything else is set on the key's page afterwards. A new key starts deliberately narrow:
- Models: all that GDPR-compliant models only allows.
- Document folders and Custom GPTs: none. Choose what the key needs on its page.
- Limits, expiry, alerts and IP restrictions: none.
- Endpoints: Web search (/v2/search) is on if you may use web search yourself, so the key can call the web search endpoint. Switch it off on the key's page under Tools.
- Admin permissions: none. Admins see them in the dialog, because they can only be set when the key is created.
Click Create API key. The full key, starting with sk_, appears once. Copy it with Copy and put it straight into a secrets manager or an environment variable. It can't be shown again. Done (or closing the dialog) opens the new key's page.
If you lose a key, regenerate it on its page under Danger zone, or revoke it. A lost key can't be recovered.
All options are explained in Permissions.
Use a key
Send the key as a Bearer token in the Authorization header of every request:
POST /platform-api/api/v2/chat/completions
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
The Anthropic-compatible endpoint takes the same key in the x-api-key header, which is where the Anthropic SDK sends it.
A key's page
Click a key in the list to open its page. Above the content are the sections Overview, Limits, Alerts, IP restrictions, Spending, Logs and Danger zone as tabs; on a phone you swipe through them. Every section has its own address you can share or bookmark.
Everything is changed in place, without an edit dialog:
- Switches and lists save at once. Add document folders and Custom GPTs with Add and remove an entry with its ✕.
- Models: the row says what the key may use, for example "12 of 40 models, 3 providers". Choose models opens a list of every model by provider, with a checkbox per model and per provider and a search field. Save stores the choice, Cancel drops it.
- Number fields take digits only; amount fields also take a comma with at most two decimals.
- Amounts save when you leave the field or press Enter. Escape goes back to the saved value.
- Change the name right in the title.
- After each change Saved appears, and the message at the bottom offers Undo.
Changes with consequences ask first: switching off GDPR-compliant models only, a monthly limit below the month's spend, and Deactivate. In an organisation under professional secrecy (§203) the data protection switches are locked.
Limits and expiry
Under Limits you set:
- Monthly limit: the most the key may spend per calendar month. Above it the API answers
402. Without an amount there is no monthly limit. - Daily limit: the most it may spend per day, at least €0.01. It resets every day at midnight German time. Above it the API answers
402. Without an amount there is no daily limit. - Expiry: the last day the key works, tomorrow at the earliest. Pick it in the calendar or with 30 days, 90 days, 1 year and No expiry. After the end of that day the API answers
401with the codeapi_key_expired, and the list shows the key as Expired. A new date makes it usable again.
If an admin or a role with Manage all Platform API keys set a key's daily limit, expiry date or IP restriction, it says "Set by …". The person who created the key can then only tighten the setting (a lower limit, an earlier date); only one of those people can loosen it.
Set up messages before a limit is reached or before expiry under Alerts, described in Key alerts. Which addresses may use a key you decide under IP restrictions, described in IP restrictions.
Deactivate, regenerate, revoke
In the Danger zone:
- Deactivate suspends a key. Requests with it return
401 Unauthorizeduntil you Activate it again. A key that belonged to the removed Agents product, marked System-managed in the list, can be deactivated or revoked but not activated again; its settings cannot be changed. A key that an administrator or a role with Manage all Platform API keys deactivated can only be activated again by one of them, not by the person who created it. - Regenerate gives the key a new secret. The old one stops working at once; settings and history stay. The new key is shown once. Only the person who created the key can do this, because the key acts in their name on files and tickets. Everyone else revokes it instead.
- Revoke disables the key permanently. Type the key's name to confirm. This can't be undone. A revoked key stays in the list under Revoked for 90 days, read-only.
Deactivate and Revoke are also in the menu at the end of a row in the list.
A key whose creator lost the Platform API right
In an organisation, a key a member created works only while that member may still use the Platform API. If their role loses that right, requests with the key are refused with 403 and this body:
{
"error": "This API key is disabled: the member who created it no longer has permission to use the Platform API. An organisation admin can grant the permission or create a new key.",
"code": "api_key_owner_lacks_permission"
}
The Anthropic-compatible endpoint sends the same message in its own error format.
The key works again as soon as the member gets the right back. Otherwise an administrator creates a new key for the integration.
Find a key
- The tabs All, Active, Inactive, Expired and Revoked show how many keys each has.
- Search by name or key and sort by name, Last used or Limit.
- The Limit column shows the month's spend against the monthly limit, for example "€182.40 of €500.00 / month", with a bar. Without a monthly limit it says No limit.
- Keys DeutschlandGPT creates for its own features are in the same list. Their settings can't be changed.
In an organisation, everyone who may use the Platform API sees their own keys. Every key of the workspace, with its spend, is listed for administrators with full rights, roles with Manage all Platform API keys and people who may Manage credits and spending limits. Changing a key (its permissions, limits, expiry, alerts, IP restrictions, tools, deactivating or revoking it) is up to the person who created it, administrators with full rights and roles with Manage all Platform API keys. Everyone else sees the key's page read-only.
Usage per key
A key's page shows under Spending its costs per day and model for 7 days, 30 days, this month, all time since it was created or a custom period of any length. Across all keys, Usage breaks spending and tokens down by key, so you can see which integration consumes the most. The breakdown covers the keys you see on the API keys page. More in Dashboard.
Security recommendations
- One key per application. Separate keys per service or environment let you revoke one without touching the others.
- Never commit keys to source control. Keep them in environment variables or a secrets manager.
- Never put a key into browser code. Anyone who opens the page can read it.
- Rotate regularly. Create a new key, switch your application over, then revoke the old one, or give a key an expiry date.
- Watch the usage. A sudden jump in spend on one key is often the first sign of a leak.