Get an OpenAI Admin API key

For the AI API Cost widget on your dashboard - connects to OpenAI's real usage/cost data. Read the note at the bottom: this is org-level API billing, not your personal chatgpt.com session/message limits (those have no public API, period).

Create the key

  1. Sign in as an Organization Owner - only owners can create Admin keys.
  2. Go to platform.openai.com/settings/organization/admin-keys.
  3. Click Create new admin key, name it, click Create.
  4. Copy the secret into your secrets manager. It's shown only once.

This is a different key type than a regular project API key (sk-proj-...) - those can't call the Usage/Costs endpoints and will fail to connect.

Using the key

Astrodesk sends it as a Bearertoken to OpenAI's Usage (/v1/organization/usage/completions) and Costs (/v1/organization/costs) endpoints - token counts, model breakdown, and daily spend for your whole organization, not just one project.

What this key does not give you

This key powers Astrodesk's AI API Costwidget - real today/month spend and token counts from OpenAI's API billing. It does notgive you the message-limit counters on chatgpt.com (e.g. "how many GPT-5 messages do I have left this week") - that belongs to your personal ChatGPT Plus/Pro subscription and has no public API at all, Admin key or otherwise.