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 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 does not yet divide OpenAI spend by customer. OpenAI's line items are matched to kinds of token only once their names are certified against a real organization's report, since dividing on a guess could split a bill wrongly. Until then, usage data naming OpenAI calls is accepted and recorded, and OpenAI spend shared between customers stays unknown by customer.
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.