Integration · OpenAI
Pull OpenAI usage and invoices into the unified AICosts.ai dashboard — read-only, under 2 minutes.
Setup in 4 steps
Create a read-only API key in the OpenAI console
Settings → API keys → Create new → restrict permissions to read usage and billing. Copy the key.
Paste it into AICosts.ai
Dashboard → Platforms → Add OpenAI → paste the key. Backfill defaults to 90 days.
Watch it flow in
Usage events and invoice lines land in your dashboard within minutes. Auto-refresh is hourly.
Slice by model, environment, or custom tag
Break down GPT-4o vs GPT-4o-mini vs o1 spend. Filter by any usage_metadata tag you passed at request time.
What you get
Separates input tokens, output tokens, and cached tokens
OpenAI's prompt-caching discount (~50% on cached input) is surfaced separately so you can see real cache-hit economics, not a blended number.
Batch-API aware
Batch usage lands in a different bucket and shows its own ~50% rate. You see which workloads are on batch vs real-time.
o1 and reasoning-token tracking
Reasoning tokens on o1-series models are billed separately. AICosts.ai breaks them out so your 'why is o1 so expensive' question has a concrete answer.
Zero application code changes
We never touch your SDK or request path. Read-only billing aggregation, not a proxy.
Use cases
Finding prompt bloat
Week-over-week input-tokens-per-request trend surfaces when few-shots, tool schemas, or retrieved context quietly grew.
Validating model-swap experiments
Tag traffic with experiment=swap_4o_mini, then compare cost-per-request across arms in the dashboard.
Forecasting next month's OpenAI bill
30-day moving average × growth rate beats the 'eyeball the console' method when the number matters for runway.
Frequently Asked Questions
Does AICosts.ai see my OpenAI prompts or completions?+
No. We read from OpenAI's usage and billing APIs, which return aggregate token counts and dollar amounts per model per time period. Prompt content never leaves OpenAI's servers.
Can I track multiple OpenAI organizations or projects?+
Yes. Add each organization key as a separate connection. The dashboard merges them into a single OpenAI view with a per-org filter.
What if I rotate my OpenAI key?+
Paste the new key under the same connection. Historical data is preserved; only the ingestion credential changes.
Does this work for Azure OpenAI?+
Azure OpenAI is a separate integration (via Azure Cost Management) because the billing surface is Azure's, not OpenAI's. We support both side by side.
Connect OpenAI in under 2 minutes
Read-only ingestion. No proxy. No changes to production.
Start tracking your AI spendFree tier available. Read-only ingestion. No changes to production.