Connect to OpenAI
Overview
Finout's OpenAI integration ingests usage and cost data across two surfaces — OpenAI Platform (API-based usage via the Cost API) and OpenAI Codex (Enterprise usage via the Codex Analytics API). You connect either or both, and your OpenAI spend appears alongside your other cloud and SaaS services in MegaBill for a unified view.
The two surfaces are:
OpenAI Platform — usage and cost data via the Cost API (models, tokens, projects, users).
OpenAI Codex — usage and cost data via the Codex Analytics API, across the CLI, IDE extension, cloud agent, desktop app, and GitHub/Code Review surfaces.
With this integration, you can:
Connect one or both OpenAI surfaces, and one or more OpenAI organizations.
Include OpenAI cost and usage data in custom dashboards, set up alerts to track anomalies, and incorporate it into your financial plans.
Note: Finout uses read-only access to OpenAI APIs. It does not perform actions that can create, modify, or incur costs.
Before you start
Each surface you connect requires its own credentials:
OpenAI Platform requires an Admin API key. You must be an Organization Owner to create one.
OpenAI Codex requires an Analytics API key and your Codex Workspace ID. You must have Codex enabled on a ChatGPT Enterprise plan, with owner or admin access to the OpenAI Admin Console to create the key and find your Workspace ID.
Step 1: Create your OpenAI credentials
Create a key for each surface you plan to connect.
OpenAI Platform — Admin API key
Prerequisite: Only Organization Owners can create Admin API keys.
Go to the OpenAI Admin Keys page.
Click + Create new admin key.
Add a Name (e.g. "Finout Integration") and set Permissions to Read only (or Restricted, with the Usage API scope and Organization Administration set to read-only).

Click Create admin key. Copy it immediately — it will not be shown again.
Note: Only Admin API keys can access the Usage API endpoints. Finout cannot perform any actions that incur costs, but OpenAI requires an Admin key to read usage data.
OpenAI Codex — Analytics API key and Workspace ID
Prerequisite: You must be an owner or admin on a ChatGPT Enterprise plan with Codex enabled.
Collect your Workspace ID:
Log in to the ChatGPT Admin console.
Navigate to Workspace details.
Copy your Workspace ID — this is a ChatGPT UUID, distinct from your OpenAI organization ID. Save it for the connection step below.
Create an Analytics API key:
The Codex Analytics API key is created in the OpenAI Admin Console.
Log in to the OpenAI Admin Console as a workspace owner or admin.
Go to Credentials > Admin keys.
Click Create new admin key, then select your workspace.
Add a Name (e.g. "Finout Codex Analytics") and set Permissions to Restricted.
Under the analytics permissions, enable Codex Analytics: Read (
codex.enterprise.analytics.read).Click Create admin key. Copy it immediately — it will not be shown again.
Note: This key is workspace-scoped, not project-scoped — it's independent of any OpenAI Platform Admin key you've already connected.
Step 2: Connect OpenAI to Finout
In Finout, navigate to Settings > Cost Centers and click Add cost center.

Under OpenAI, click Connect Now. The OpenAI integration pop-up opens.

Enter a Cost Center Name.
Under Select the OpenAI products to connect, select OpenAI Platform, OpenAI Codex, or both.

Enter the credentials for each product you selected:
OpenAI Platform API Key — the Admin API key from Step 1.
OpenAI Codex API Key — the Analytics API key from Step 1.
OpenAI Codex Workspace ID — the Workspace ID from Step 1.
Click Complete Setup if you selected OpenAI Platform only, or Next if you selected OpenAI Codex, to continue to credit pricing.
Finout validates each credential on submit with a lightweight, read-only check. If a key or Workspace ID is invalid, the error identifies exactly which field failed.
If you connected OpenAI Platform only, your Cost Center is created here — skip ahead to What happens next. If you connected OpenAI Codex, continue below.
Step 3: Configure Credit Pricing (OpenAI Codex only)
OpenAI's Codex Analytics API reports credit consumption, not dollars. Finout calculates your cost as credits × price per credit, using the rate(s) you enter here — this figure comes from your OpenAI contract and isn't available through any API, so confirm it with your OpenAI account manager if you're unsure.

1. Ongoing pricing — the rate applied to your current usage onward:
Price Per Credit (USD)
Start Date — the date this rate takes effect
2. Historical pricing for backfilling (optional) — define previous pricing periods, for up to 13 months, so backfilled historical data is costed at the rate that was actually in effect at the time.
Click Next to review your entries on the Credit Pricing Summary step, then click Complete Setup.
What happens next
Your Cost Center is created, and you'll receive an email notification once Finout has retrieved your data. OpenAI data is backilled for the current month and up to two previous months.
Editing your integration
You can edit your OpenAI Platform key, Codex key, Workspace ID, price-per-credit schedule, or Cost Center Name at any time from Settings > Cost Centers. Editing a credential re-triggers the same validation check. Once done, you can contact Finout support at support@finout.io to back-correct data based on your edit.
Understanding the OpenAI Origin dimension
When you connect both surfaces, every OpenAI row in MegaBill carries an OpenAI Origin dimension identifying which surface it came from:
OpenAI Platform — rows ingested via the Cost API.
Codex — rows ingested via the Codex Analytics API.
Some fields apply to only one surface:
Project Name, Project ID
Yes
Empty
API Key
Yes
Empty — Codex usage is user-authenticated, not key-metered
Organization ID
Yes
Empty — Codex is workspace-scoped
Speed (standard / fast)
Empty
Yes
User Email
Empty
Yes, when your workspace exposes it — falls back to User ID otherwise
Actor Type (Account User / Service Account)
Empty
Yes
Model, Token Type, User ID
Yes
Yes
Codex API Constraints
Codex Enterprise seat fees aren't included. OpenAI invoices flat per-seat Codex fees separately, and they never appear in the Analytics API — Finout reflects consumption spend only.
Token-level cost isn't available for Codex. The Codex API reports credits per user, day, model, and speed, but doesn't break credits down by token type — so token type rows show usage without cost.
FAQs
Which OpenAI services does Finout support?
Finout retrieves cost data for all OpenAI Platform services, and detailed usage data for Completions and Images. Usage data for Embeddings, Vector Stores, Code Interpreter Sessions, Moderations, Audio Speeches, and Audio Transcriptions is expected in upcoming months.
Note: If you identify a service that isn't yet supported, contact Finout support at support@finout.io
Does Finout track historical name changes to OpenAI Projects or Users?
Finout shows data exactly as returned by OpenAI's API, which doesn't provide point-in-time names for Projects or Users. Project IDs and User IDs are unique and immutable, so this only affects display names: renaming a Project or User in OpenAI updates the name across all historical data, and if a User is deleted, Finout still shows the user ID but not the name.
Can I use one Cost Center for both OpenAI Platform and Codex?
Yes. They're two ingestion paths under a single OpenAI integration — connect either or both under one Cost Center Name.
Why is my Codex cost lower than my OpenAI invoice?
Codex Enterprise seat fees are invoiced separately by OpenAI and aren't included in Finout's Codex numbers — Finout reflects consumption (credit) spend only.
Why don't I see my onboarded Codex cost center?
Codex is reported as part of an OpenAI cost center. For Codex-specific costs, use the Origin dimension and filter it for the 'Codex' value.
Need help? If you run into any issues during setup, contact our support team at support@finout.io — we're happy to help.
Last updated
Was this helpful?