KeyBark

Read-only admin key for AI cost tools: OpenAI, Anthropic, OpenRouter

Every cost dashboard, FinOps tool or spend alert service for AI APIs asks for an admin key, because that is the only way to read organization spend. An admin key is more powerful than the API keys it reports on. Here is which key each provider needs for reading costs, which ones can be made read-only, and what to do where they can't.

Last reviewed 18 Nov 2026

The short version

  • OpenAI: an Admin API key (sk-admin-, organization owners only). You can choose Restricted permissions with Read only when you create it.
  • Anthropic (Claude Console): an Admin API key (sk-ant-admin01-, admin role only). No scopes: every Console admin key has full Admin API access. Use a dedicated key with an expiration.
  • OpenRouter: the watched key itself (it can read its own usage), or a Read only Management API key to read many keys.
  • One key per tool, named after it, so you can revoke one integration without breaking the others.
  • Write access only if the tool acts. A tool that disables keys for you (a kill switch) needs write access; a tool that only reads and alerts doesn't.
Want a heads-up before the bill does?

KeyBark checks your OpenAI, Anthropic or OpenRouter spend about every 15 minutes during the beta and emails you when it crosses a daily or monthly threshold you set, or jumps above its 7-day average. It doesn't set or enforce limits for you. Free for one key, no card.

At a glance

ProviderKey for cost readingRead-only optionExpiration
OpenAIAdmin API key, sk-admin-Yes: Restricted, ReadOptional (API: up to 1 year)
Anthropic, Claude ConsoleAdmin API key, sk-ant-admin01-No (no scopes)Chosen at creation, or Never
Anthropic, Claude EnterpriseKey from claude.ai with read:analyticsYes (scopes)See Anthropic docs
OpenRouterThe key itself, or a Management keyYes: Read only access levelChosen at creation (recommended)

OpenAI: a restricted Admin key

Only organization owners can create organization admin keys, on the Admin keys page in organization settings. OpenAI's help article says you select Create new admin key and then choose the permissions your integration needs.

  1. Name the key after the tool that will hold it (e.g. cost-alerts).
  2. Set permissions to Restricted and grant Read only. CloudZero's OpenAI setup guide grants Read on Organization Administration and Usage API for the same Costs endpoint. OpenAI's permissions page describes Usage as "view usage dashboard and export" and Organization Admin as managing users, projects, invites, admin keys and rate limits.
  3. Copy the value once; OpenAI shows it only at creation.
  4. Test it with one read before handing it over:
curl "https://api.openai.com/v1/organization/costs?start_time=$(date -d '-7 days' +%s)&limit=7" \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY"
  • The Costs endpoint returns daily (1d) buckets in USD and can group by project_id, line_item, api_key_id and more.
  • OpenAI's docs we read don't list which single permission each endpoint needs, so if a restricted key gets a permission error, widen it one read permission at a time rather than switching to full access.
  • Via the API, POST /v1/organization/admin_api_keys takes expires_in_seconds (1 to 31,536,000, i.e. up to a year; omit it for a key that doesn't expire). GET on the same path lists admin keys with last_used_at, and DELETE /v1/organization/admin_api_keys/{key_id} removes one.
  • Admin keys can't call non-administration endpoints, so they can't make model requests. OpenAI's API keys guide says to keep the administrative credential in a trusted service, separate from the keys your application uses.

Anthropic: no read-only Console key, so contain it

In a Claude Console organization, members with the admin role create admin keys on the Admin keys page (individual accounts can't; set up an organization first). Anthropic's admin key docs are explicit: Console keys have no scopes to select, and every key has full access to the endpoints that accept it.

That means a key you give a cost tool can also, through the Admin API:

  • list, invite and remove organization members (except members with the admin role) and change their roles;
  • create, update and archive workspaces and manage workspace members;
  • list API keys, rename them and change their status (e.g. set one inactive). It can't create API keys; those are made in the Console.

What you can control:

  • Expiration. You pick it when you create the key: 3 hours, 1 day, 7 or 30 days, a custom duration, or Never. It can't be changed later. Anthropic emails the creator 7 days before expiry for keys of 14+ days (key expiration). For a tool that runs every day, a 30-day or longer key plus a calendar reminder to rotate is a fair trade.
  • One key per tool. Name it after the tool; revoke it in the Console when you stop using the tool.
  • Claude Enterprise is different. Keys created on claude.ai take scopes, and read:analytics alone covers the Usage and Cost Analytics API. A call outside a key's scopes returns 403. This doesn't apply to Console (platform.claude.com) organizations.

Test the key with the cost report (Usage and Cost API; Anthropic now calls it legacy and points to the Usage and Cost Analytics API, which also takes an Admin key):

curl "https://api.anthropic.com/v1/organizations/cost_report?starting_at=2026-11-01T00:00:00Z&ending_at=2026-11-18T00:00:00Z" \
  -H "anthropic-version: 2023-06-01" \
  -H "x-api-key: $ANTHROPIC_ADMIN_KEY"

Amounts come back as decimal strings in cents, in daily buckets. Workspace API keys don't work on these endpoints.

OpenRouter: the key itself, or a read-only Management key

  • One key: any key can read its own usage and limit with GET /api/v1/key. No extra credential needed, but note that this is an inference key, so the tool holding it could also make requests with it.
  • Many keys: create a Management API key on the Management API Keys page and set Access level: Read only. OpenRouter's docs say read-only keys can call every read a read/write key of the same scope can, and anything that would create, change or delete returns 403 Forbidden. They name monitoring and reporting as the use case.
  • Scope: a management key covers the whole organization or one workspace. Workspace-scoped keys see only that workspace's keys and budgets.
  • Expiration: OpenRouter recommends one on every management key; it is fixed at creation, and an expired key gets 401 API key expired. Management keys can't call the completion endpoints.
curl https://openrouter.ai/api/v1/keys \
  -H "Authorization: Bearer $READ_ONLY_MANAGEMENT_KEY"

More on reading OpenRouter spend per key: OpenRouter usage per API key.

When a tool needs write access

Reading costs needs read access. Acting on them doesn't: disabling a key automatically (OpenAI: delete a project API key; Anthropic: set a key inactive; OpenRouter: PATCH a key to disabled) needs a key that can write. If you want that, give it a separate, clearly named key and know what else that key can do. If you only want alerts, give read access and nothing more.

Checklist before you paste an admin key into any tool

  1. A new key just for this tool, named after it.
  2. OpenAI: Restricted, Read only. OpenRouter: Read only management key (or the watched key). Anthropic Console: accept full access, or don't connect.
  3. An expiration where the provider offers one, and a reminder to rotate before it.
  4. Ask the tool how it stores the key (encrypted at rest? deleted when you remove it?) and which endpoints it calls.
  5. Never in a browser, mobile app or the same secret store as your inference keys.
  6. Revoke it the day you stop using the tool.

Not sure your provider limits would stop a leaked key or a runaway loop in the first place? The free AI key limit audit walks through OpenAI, Anthropic and OpenRouter limits in a few minutes (no sign-up, no key needed). Related: OpenAI cost per API key, Anthropic cost per API key, Anthropic API key leaked.

Where KeyBark fits (and where it doesn't)

KeyBark is one of the tools that asks for these keys, so here is exactly what it does with them. For alerts it reads costs: OpenAI GET /v1/organization/costs, Anthropic GET /v1/organizations/cost_report, OpenRouter GET /api/v1/key or /api/v1/keys/{hash}, about every 15 minutes during the beta, and emails you when a daily or monthly threshold you set is crossed or today's spend jumps above its 7-day average. Keys are checked with the provider, then encrypted (AES-256-GCM) before storage, and deleted when you remove them (how we store keys).

Limits, honestly: the optional kill switch (paid, beta, off unless you turn it on) is the only part that writes, so it needs a key with write access; a read-only key won't work for it. We haven't tested every OpenAI restricted-permission combination, so if a restricted key is rejected when you connect it, tell us. KeyBark can't make an Anthropic Console key read-only; nobody can. Provider cost data comes in daily buckets and checks run on a schedule, so an alert can arrive after money has been spent.

FAQ

Can an OpenAI admin key be read-only?

Yes. When an organization owner creates an admin key in the OpenAI dashboard, they choose its permissions. For a cost tool, choose Restricted and grant only Read. CloudZero's setup guide for the Costs endpoint uses Read on Organization Administration and Usage API. OpenAI's docs we read don't name the single permission GET /v1/organization/costs needs, so test the key with one call before you rely on it.

Can an Anthropic Admin API key be read-only?

Not in a Claude Console organization. Anthropic's docs say Console admin keys (sk-ant-admin01-) have no scopes to select: every key has full access to the endpoints that accept it, including members, invites, workspaces and API key status. Claude Enterprise keys (created on claude.ai) do have scopes such as read:analytics. For a Console key, the controls you have are a dedicated key per tool, an expiration and revoking it when you stop using the tool.

Which OpenRouter key does a usage dashboard need?

To watch one key, the key itself is enough: GET /api/v1/key returns that key's usage and limit. To watch several keys, use a Management API key with the Read only access level. OpenRouter says read-only management keys can call every read route their scope allows and get 403 on anything that would create, change or delete. Workspace-scoped keys see only their own workspace.

Can an admin key make model requests?

No, for all three. OpenAI says admin API keys can't be used for non-administration endpoints, and OpenRouter says management keys can't call its completion endpoints. Anthropic's Admin API key is for the Admin API and the reporting APIs. A leaked admin key can't run up token spend directly, but on OpenAI and Anthropic a key with write access can change or disable your other keys.

Sources (read 18 Nov 2026): OpenAI Admin and Audit Logs API (help), Admin APIs, API keys and service accounts, permissions, API reference: admin keys create, list, delete, costs; Anthropic Create an Admin API key, Admin API, key expiration, Usage and Cost API; OpenRouter Management API keys; CloudZero Connecting to OpenAI. KeyBark is not affiliated with OpenAI, Anthropic or OpenRouter.

Want a second line of defence?

KeyBark watches your OpenAI, Anthropic and OpenRouter spend from the server and flags a crossed threshold or spike by email and on your dashboard. Free for one key.