Skip to content

Connecting OpenAI

What you need

An Admin key, not a regular API key, and not a Project key. Only Admin keys can read account-wide usage and cost data, which is what TokenFront needs. A regular API key will let you make AI calls but won't show TokenFront your spend.

If you don't manage OpenAI billing for your company, your IT team or engineering lead can generate this key, or add the connection themselves. It takes about a minute.

Step 1: Get your Admin key from OpenAI

  1. Go to OpenAI's Admin Keys page.
  2. Click Create admin key.
  3. Give it a name you'll recognize later. "TokenFront" is fine.
  4. Copy the key immediately. OpenAI only shows it once. If you navigate away before copying it, you'll need to create a new one.

Step 2: Add it to TokenFront

  1. Open Connect OpenAI in TokenFront.
  2. Paste the key into the Admin key field.
  3. Optionally, add your Organization ID. Find it in OpenAI under Settings → Organization → General. Leave it blank if you're not sure; it's not required.
  4. Save.

TokenFront starts pulling in your usage and cost data right away. Expect the first sync to take 30–90 seconds since it's importing up to a year of history.

If the connection shows "Key Error"

The most common cause is pasting a regular API key instead of an Admin key. Double-check you generated it from the Admin Keys page linked above, then edit the connection in TokenFront and paste in a fresh one.

TokenFront Help