ChatGPT & Codex Workspace Integration
Last updated: October 28, 2026
The ChatGPT & Codex Workspace integration brings daily ChatGPT and Codex usage from your ChatGPT Enterprise workspace into Span, per person, including the dollar value of the credits each person used.
If you have ChatGPT Enterprise and people sign in to ChatGPT or Codex with their ChatGPT account, use this integration. If you use the OpenAI API platform (an organization on platform.openai.com, with API keys for apps, scripts, or Codex signed in with an API key), use the OpenAI Platform integration instead. Many companies have both and connect both.
Why it matters
Many teams pay for ChatGPT Enterprise and use Codex through it, but the usage lives in OpenAI's console, away from the rest of your AI tools. Connecting the workspace puts ChatGPT and Codex next to Cursor, Claude Code, and GitHub Copilot, so you can see who uses them by team and person.
For engineering leaders: see ChatGPT and Codex adoption alongside your other AI tools in Tool utilization.
For finance and platform owners: see each person's ChatGPT and Codex usage, valued in dollars as OpenAI reports it, as overage spend in AI Spend.
How it works
Span connects to your workspace with a workspace Admin API key and reads one report: OpenAI's daily usage report for the workspace. For each person and UTC day with activity, it includes:
Data | What it includes |
|---|---|
Person | The user's ID and email address |
Activity | Chats and messages for ChatGPT, and threads and turns for Codex |
Clients | The same activity broken down by client, such as ChatGPT web, ChatGPT desktop, Codex CLI, or a Codex IDE extension |
Models | Usage per model, when OpenAI provides it |
Tokens | Input, cached input, and output tokens |
Credits and cost | Credits used, OpenAI's estimated USD value of those credits, and any usage priced directly in USD |
Code | Lines of code added and removed by Codex, when OpenAI provides it |
Span only reads this usage report. It doesn't read conversations, prompts, files, or any other content, and doesn't change anything in your workspace.
Two tools in Span. Span splits each person's day by client. ChatGPT web, desktop, and mobile appear as the tool ChatGPT. Every other client, such as the Codex CLI and Codex IDE extensions, appears as Codex CLI, the same tool agent traces report Codex sessions under. Usage that OpenAI doesn't attribute to a client also counts as Codex CLI.
Tool utilization. A person counts as active for ChatGPT or Codex CLI on any day they had at least one chat, message, or any spend in that tool. Codex lines added and removed count toward accepted lines of code. ChatGPT adds no lines.
AI Spend. ChatGPT and Codex CLI spend appear as separate tools, broken down by model when OpenAI reports per-model usage. Usage without a model breakdown appears under the model other. All workspace spend is usage-based, so it appears as overage spend.
How credits become dollars. Span doesn't apply its own credit price. For each person and day, spend is OpenAI's estimated USD value of the credits used, plus any usage OpenAI priced directly in USD. Span shows the dollar amount, not the credit count.
Where it shows up. People with the Manage Integrations permission see the connection in the Integrations status on both the Tool utilization and AI Spend pages. Everyone else sees ChatGPT and Codex CLI under Supported tools on both pages.
Matching people. Span matches workspace usage to people by email address. The email on the user's ChatGPT account must match the email of a person who is active in Span. Matching isn't case-sensitive. Usage with no email, or with an email that matches no one, isn't attributed to a person or team, doesn't count toward Tool utilization, and appears under Unknown in the integration status.
One connection per workspace. You can connect more than one ChatGPT Enterprise workspace. Each connection is tied to its workspace ID, so the same workspace can't be connected twice, and replacing the key keeps the same connection and its data.
Setup
You need the Manage Integrations permission in Span and admin access to your ChatGPT Enterprise workspace. The workspace must have access to OpenAI's daily usage analytics.
Open the OpenAI Admin Console at admin.openai.com and go to Credentials → Admin keys.
Select Create new admin key and choose your workspace.
Select Custom permissions. Set Enterprise analytics API to Read and leave everything else at None. Create the key and copy it.
Copy your ChatGPT Enterprise workspace ID. It's a UUID, such as
00000000-0000-0000-0000-000000000000.In Span, go to Settings → Integrations. Find ChatGPT & Codex Workspace (tagged Developer Tools) and click Connect.
Fill in the three fields:
Workspace name: how this workspace is labeled in Span, to tell connections apart, such as "AI Engineering".
Workspace ID: the ID you copied in step 4.
Admin API Key: the key you created in step 3.
Click Continue. Span checks the key against your workspace's usage report before saving. The connection then lists the workspace name and ID.
To add another workspace, open the integration and click Connect another. To replace a key, click Edit on the connection.
After you connect, allow a few hours for data to appear.
If the check fails, Span tells you why:
"The ChatGPT Admin API rejected the key: it's missing or invalid." Use a workspace Admin API key, not an API Platform key.
"The ChatGPT Admin API refused access." The key is missing Enterprise analytics API → Read, belongs to a different workspace, or the workspace isn't eligible for daily usage reporting.
Things to know
ChatGPT Enterprise only. The integration reads a ChatGPT Enterprise workspace's daily usage report, and the workspace must be eligible for that report.
API Platform keys don't work. An OpenAI API Platform admin key (it starts with
sk-admin-) is rejected. Usage billed to OpenAI API keys, including Codex signed in with an API key, doesn't come through this connection. Connect OpenAI Platform for that usage. The two connections read different OpenAI reports: API-key usage appears under OpenAI API, and ChatGPT sign-in usage under ChatGPT and Codex CLI. Span doesn't deduplicate between the two.No plan settings. ChatGPT and Codex CLI have no entry in AI Spend Integration Settings, so there's no seat price or base spend for them. Span doesn't show what you pay for Enterprise seats.
Estimates, not your invoice. The dollar amounts are OpenAI's estimates of the value of usage, so they won't match exactly what you pay for seats or credits.
Model split is proportional. OpenAI reports models per person and day, not per client, so Span splits both the ChatGPT and the Codex CLI amounts across models in the same proportions.
Agent traces take priority in Tool utilization. Where agent traces cover a person and day for Codex CLI, Tool utilization uses the trace data instead of the workspace data for that person and day, so the same day isn't counted twice. ChatGPT usage isn't affected. AI Spend still uses the workspace amounts, because traces add no spend.
Deleted users. OpenAI leaves deleted users out of per-person usage, so their past usage isn't in Span.
Days are UTC. OpenAI reports usage by UTC day, so a late-evening session in US time zones can land on the next day.
Freshness. Span syncs from OpenAI about every 2 hours, and each sync re-reads the previous 2 days because OpenAI corrects recent usage as late data arrives. The last couple of days can change slightly, and today's numbers are partial until the day ends. Tool utilization updates within a few hours of a sync. AI Spend rebuilds its combined spend about every 6 hours, so new spend can take longer to show there.
History. The first sync requests usage back to your organization's integration sync start date.
Worked example: matching and traces. Your workspace has 50 users. 46 sign in with work emails that are on their Span person records, and 4 use personal emails. Tool utilization can count at most those 46 people, and the 4 personal emails appear under Unknown in the integration status. One of the 46, Dana, has agent traces installed on her laptop. She uses Codex on her laptop on Monday and Tuesday, and on a machine without traces on Wednesday. The workspace reports Codex use on all three days. Tool utilization shows 3 Codex CLI days for Dana: Monday and Tuesday from her traces, Wednesday from the workspace.
Worked example: spend. On Monday the workspace reports Dana's ChatGPT web usage with an estimated value of $0.80, and her Codex usage with an estimated value of $2.90 plus $0.30 priced directly in USD. AI Spend shows $0.80 of ChatGPT overage and $3.20 of Codex CLI overage, $4.00 in total. If OpenAI reports that 75% of her usage that day was on one model and 25% on another, Span splits both amounts 75/25: ChatGPT $0.60 and $0.20, Codex CLI $2.40 and $0.80.
Related articles
Why AI tool or Spend data might be missing for a person
Understanding Agent Traces in Span (auspex)
Need help?
Contact your Span account team or reach out to support@span.app.