Connect your providers
Connect OpenAI
Read OpenAI API spend from the organization's costs report with an admin key, and explain it by model, project and team.
CostReveal reads what OpenAI bills from your organization's costs report, through OpenAI's Admin API, with an admin key. Nothing changes in the code that calls OpenAI.
What you need
- An OpenAI organization, and an organization owner, who can create admin keys.
- An owner or admin role in CostReveal.
Connect
- In the OpenAI Platform, go to Settings, Organization, Admin keys and create a key. Name it for CostReveal, so it can be deleted on its own. Give it an expiry if your policy asks for one, and enter a new key before it ends.
- In CostReveal, go to Connections, open OpenAI, and choose Connect OpenAI.
- Paste the key and choose Verify and connect. CostReveal reads your organization's projects and its costs report with the key before saving anything, and says exactly what is wrong if it cannot.
OpenAI reports costs by day and updates the current day as it goes. CostReveal reads them every hour, so today's figures grow until the day ends. The first read brings in the current month and the twelve before it, as far as OpenAI holds them. Where OpenAI holds no older months, Connections says how far back it reached, and each read asks again.
What an admin key can do
OpenAI admin keys cannot be limited to reading: a key could also manage your organization's members, projects and API keys. CostReveal only ever reads costs and projects with it. The key is encrypted at rest, is never shown again after you enter it, and is deleted when you remove the connection. Delete it in the OpenAI Platform at any time; CostReveal then keeps every figure already read and tells you new data has stopped.
Which organization a key belongs to
OpenAI's Admin API does not name the organization a key belongs to. CostReveal knows it by the project it was created with: projects are archived, never deleted, so that project is the organization's for as long as it exists. This is what stops one OpenAI organization from feeding two CostReveal projects, and what a replacement key must match.
How spend is explained
- Service and model come from OpenAI itself, so they are DIRECT. A line item such as
gpt-5, input_tokensis filed under OpenAI API tokens, for its model, with the tokens it billed for. Other line items, such as images, are each their own service, with their quantity in their own unit. - Team, feature and customer come from your projects: an owner you name for the project under Connections, Project owners explains its spend. OpenAI projects carry no tags, so a project without an owner is UNKNOWN, shown as such and never spread across teams.
- Costs OpenAI reports outside any project are listed as No project, and can be given an owner too.
- Naming a project's owner explains every past period again. Renaming a project changes the name shown, and no figure.
Usage data and OpenAI
Usage data divides the OpenAI spend that project owners, tags and rules leave unknown by each customer's, feature's, team's or user's measured tokens, and marks it ALLOCATED. OpenAI's costs report states the tokens of each line item, named by a model and a kind, such as gpt-5, input_tokens:
- Input is one pool, output another. Input of every kind, cached and audio included, is divided by the input tokens your data reports, which count cached input too, as OpenTelemetry does. OpenAI documents no list of its kinds, so cached input is not divided apart: an owner whose calls hit the cache more is charged the pool's average price per input token.
- Only what is counted in tokens. A line counted in anything else, such as images, or whose kind names neither input nor output, stays Not yet explained rather than divided on a guess.
- A model matches however each side writes its snapshot.
gpt-5-2025-08-07in your data matchesgpt-5on the bill.
How figures are checked
- Every amount is read exactly as OpenAI wrote it, never through a floating point number, so 0.1 and 0.2 add up to 0.3.
- Every line is recorded as OpenAI reported it: a day, a project and one line item. A day OpenAI updates is recorded as a correction, and what it said before is kept.
- Reading the same data again records nothing new.
- Each month's detailed lines must add up to the organization's total for the month, read separately. While a month is open a difference is shown as pending; once the month has closed it is flagged.