✨ Software.com is now Antenna. Read more →
Skip to Content

Codex

Antenna automatically tracks AI coding metrics from OpenAI Codex by pulling data from the Codex Enterprise Analytics API. Get insight into adoption, activity, and the impact of Codex on your team’s productivity.

The Codex Analytics API is currently available only for ChatGPT Enterprise customers. ChatGPT Plus users are not supported.

Prerequisites

Which API key you need

OpenAI issues several kinds of credentials, and only one of them can read Codex analytics: a workspace-scoped Admin key with the Codex analytics API permission set to Read (the codex.enterprise.analytics.read scope). Admin keys are created in the OpenAI Admin console, not in the API Platform portal.

CredentialWhere it comes fromWorks for this integration
Admin key with Codex analytics API: ReadOpenAI Admin console  > Credentials > Admin keysYes
API Platform project or organization keyplatform.openai.com No
Codex access token  or service-account token ChatGPT Admin console No — these authenticate Codex CLI and automation, not the Analytics API

Setup

Create an Admin key

  1. Sign in to the OpenAI Admin console as a workspace owner or workspace admin, and go to Credentials > Admin keys.
  2. Select Create new admin key and give it a descriptive name such as Antenna Codex Analytics.
  3. Select the workspace you want Antenna to report on.
  4. Choose Custom permissions and set Codex analytics API to Read. This grants the codex.enterprise.analytics.read scope.
  5. Copy the key and store it securely — you can only view it once.

The key must be an Admin key with the Codex analytics API permission. API Platform project keys cannot read Codex analytics, even with read-only permissions.

Find your workspace ID

Open the ChatGPT Admin console as a ChatGPT admin or Codex admin and copy the Workspace ID from the workspace settings page. Use the workspace your Admin key is scoped to.

Connect in Antenna

  1. In Antenna, go to Settings > Sources > Add source.
  2. Find Codex and click Connect.
  3. Paste your Admin key and workspace ID.
  4. Click Connect.

Data collected

We pull from the Codex Enterprise Analytics API:

PurposeEndpoint
Daily usage metricsGET /v1/analytics/codex/workspaces/{workspace_id}/usage

This API returns daily Codex adoption and code review metrics for a workspace, including:

  • Threads and turns — total conversation threads and individual turns
  • Credits — credit consumption per user or workspace
  • Per-client usage — breakdowns by client application
  • Token usage — text input, cached input, and output token counts

Requests use Authorization: Bearer <admin_api_key> against https://api.chatgpt.com/v1/analytics/codex.

OpenAI documentation

TopicOpenAI documentation
Endpoints, schemas, scopes, and key provisioningCodex Analytics API reference  (sign-in required)
What the Analytics API is for and its workspace boundaryAnalytics API 
Which reporting surface owns which dataWorkspace analytics  and Governance 
Who can administer workspace credentialsRoles and workspace permissions 
Audit and investigation records, which the Analytics API does not provideCompliance API 
Last updated on