OpenAI API cost tracking with spike alerts
Daily OpenAI API cost per project and model, token counts, and an alert the day a model's spend jumps, so a runaway loop costs hours instead of weeks.
What Burnstack tracks
- Cost in USD from OpenAI's Costs API, per project and line item
- Input, cached and output token counts
Alerts
- AI model spike: a model's daily cost above 2.5× its 14-day median (critical at 5×)
- Vendor spend spike across all of OpenAI
The key you'll need
An organization Admin key (starts with sk-admin) from platform.openai.com → Settings → Organization → Admin keys. Project keys can't read costs.
Burnstack checks the key with OpenAI, shows the account it belongs to when OpenAI lets the key see it, and stores it in your computer's keychain (macOS Keychain or Windows Credential Manager). It only reads billing and usage.
Connect it: OpenAI
Need
- Key: Admin key
- Plan: Any paid API organization; only Owners can create Admin keys.
- Permissions: Permissions: Restricted Usage API: Read Organization Administration: Read not yet verified
An organization Admin key is required; project keys can't read usage or cost.
Steps not yet verified
- Sign in as an organization Owner.
- Open Settings → Organization → Admin keys and click Create new admin key.
- Name it Burnstack; set Permissions to Restricted with Read on the Usage API and Organization Administration (projects).
- Create it, copy the key (sk-admin…) and paste it into Burnstack.
Paste it
In Burnstack: Connectors → OpenAI → Add key → paste → Validate & save. The key goes straight into your computer's keychain.
If it fails
- This doesn't look like an Admin key
- Project keys (sk-proj-…) can't read usage or cost. Create an Admin key under Settings → Organization → Admin keys.
- OpenAI API error 404 (Costs API)
- Some organizations get 404 from the Costs API (a known OpenAI issue). Burnstack says so rather than showing $0; contact OpenAI support or import invoices meanwhile.
- OpenAI API error 403 not yet verified
- The Restricted key lacks a scope: create one with Read on the Usage API and Organization Administration, or Read only.
Let your AI do the clicking not yet verified
Paste this into an AI assistant that can use your browser, such as Claude in Chrome. It opens OpenAI's key page and sets only the permissions above, then stops before the final button that creates the key.
Open https://platform.openai.com/settings/organization/admin-keys in my browser. Choose 'Create new admin key' and name it 'Burnstack'. Set Permissions to 'Restricted' and give Read to the Usage API and to Organization Administration (Burnstack lists projects), and None to everything else. OpenAI has no expiry setting for this key, so skip that. Stop before clicking 'Create admin key' (the final button that creates the key) and tell me it's ready. I'll click it, copy the key and paste it into Burnstack myself. Don't copy, read or paste the key, and don't grant broader access or change any other setting. If OpenAI asks me to sign in or confirm with 2FA, wait for me.
The key never passes through the AI: you click that last button yourself, copy the key and paste it into Burnstack.
What you'll see
- Billed: Billed cost, as OpenAI charges it.
- History: Not documented. not yet verified
- Delay: Not documented; the last 3 days are re-fetched every sync. not yet verified
Good to know
- Some organizations get a 404 from OpenAI's Costs API. Burnstack shows the error instead of $0.
One bill, not a dashboard per vendor
Burnstack puts OpenAI next to the rest of your spend and lets you group it by product with applications. Other integrations: Vercel, Neon, Supabase, Anthropic, GitHub, OpenRouter, DigitalOcean, Twilio, Stripe fees, Cloudflare, Netlify, AWS, Datadog, Sentry, Cursor, PlanetScale, Azure, Google Cloud, MongoDB Atlas, Railway, Render, Heroku, Akamai (Linode), Vultr, Fastly, Runpod, xAI, Together AI, fal.ai, Runway, Upstash.
OpenAI questions
Does Burnstack replace OpenAI's spend limits?
Is my OpenAI Admin key safe?
Start watching back.
Five minutes to connect your first vendor. Free for Mac, forever, and every byte stays yours.