ChatGPT Workspace AI cost and usage integration

Use the ChatGPT Workspace Advanced Integration to collect usage, credits, and costs from your ChatGPT Business or Enterprise workspace. Yarken retrieves daily usage by user and client through the ChatGPT Admin API, transforms it into FOCUS-aligned records, and loads it into AI Usage Data (aiConsumption).

Separate OpenAI integrations: ChatGPT Workspace uses a workspace Admin key and https://api.chatgpt.com. The separate OpenAI AI Consumption integration collects OpenAI API Platform usage and costs. Both keys can begin with sk-admin-, but they are not interchangeable.


What the integration provides

  • User-level usage: Daily activity, credits, and usage-based cost for each workspace user.

  • Client-level reporting: Separate ChatGPT, Codex, and Agents usage across supported web, desktop, mobile, CLI, and IDE clients.

  • Token metrics: Uncached input, cached input, output, and total tokens.

  • Main model: The primary model associated with a service's daily activity, with Standard or Premium speed where applicable.

  • Pricing: Source billed costs, estimates, and credit-based costs when available.

  • FOCUS-aligned reporting: Analyze workspace consumption alongside other AI providers.

The integration collects usage-based credits and costs, not ChatGPT Business or Enterprise seat subscription fees.


Before you begin

Requirement

Details

ChatGPT workspace

A Business or Enterprise workspace with access to workspace analytics.

Admin key creation

Workspace Owner or Admin role.

Workspace Admin key

Key created in the ChatGPT Admin Console, beginning with sk-admin-.

Workspace ID

The UUID of the workspace you want Yarken to connect.

Organization ID

Optional org- identifier. Used for billing account attribution when supplied.

Permissions

Read access configured as described below.

Yarken access

A Yarken administrator to authorize the Advanced Connection.

Integration availability

Yarken has enabled and deployed the integration for your environment.

Create the ChatGPT Workspace Admin key

Step 1. Create the key

  1. Sign in to the ChatGPT Admin Console as a workspace Owner or Admin.

  2. Go to Credentials > Admin keys.

  3. Create an Admin key for the workspace you want to connect.

  4. Configure the required read permissions.

  5. Copy and store the key securely. The key is displayed only once.

Step 2. Configure required permissions

Workspace role

Configuration

Owner

Set Permissions to Read only.

Admin

Select Custom and set all five permission categories below to Read.

Custom permission category

Access

Usage limits

Read

Costs

Read

Workspace/Enterprise analytics

Read

Codex analytics

Read

Users

Read

The five Custom permission categories follow the ChatGPT Workspace connection's on-screen instructions. Yarken requires no write access.

Step 3. Check the key and workspace identifiers

Credential or identifier

Supported

Notes

ChatGPT Workspace Admin key (sk-admin-)

Yes

Created in the ChatGPT Admin Console.

OpenAI API Platform Admin key (sk-admin-)

No

Same prefix, different platform.

OpenAI project key (sk-proj-)

No

Not a workspace Admin key.

Codex access token (at-)

No

Cannot authorize this connection.

Workspace ID

Required

UUID from chatgpt.com/admin, not the Organization ID.

Organization ID

Optional

Identifier beginning with org-.

For more information, see Managing Admin keys in the ChatGPT Admin Console.

Authorize the ChatGPT Workspace connection in Yarken

  1. Sign in to Yarken as an administrator.

  2. Go to Admin > Pipelines > Connections.

  3. Select the ADVANCED tab.

  4. Open the ChatGPT Workspace connection.

  5. Complete the connection fields and select Connect.

    Screenshot 2026-11-03 at 3.14.14 PM (1)-20261110-182533.png
    ChatGPT Workspace Advanced Connection
  6. Confirm that the connection status changes to Connected.

Connection fields

Field

Required

Description

Base URI

Yes

ChatGPT Admin API host. Default: https://api.chatgpt.com.

Workspace Admin key

Yes

Workspace key beginning with sk-admin-; a Platform Admin key will not work.

Workspace ID

Yes

UUID from chatgpt.com/admin. Do not enter the Organization ID.

Organization ID

No

Optional org- identifier used for billing-account attribution when supplied.

Use the correct Base URI: Do not enter https://api.openai.com. That host does not accept ChatGPT Workspace Admin keys.

How the connection is validated

Yarken checks the key and ID formats, then requests the workspace user list to verify authorization. Requests use HTTPS with the Authorization: Bearer <workspace Admin key> header. A Connected status confirms authorization, not that usage data has been loaded. The key can stop working if it expires, is revoked, or its creator loses the Owner or Admin role.

For shared authorization steps, see Authorize Advanced Connections.


How the integration works

  1. Retrieve daily workspace usage by user and client through the Workspace Analytics API.

  2. Retrieve the workspace user list to associate usage with user email addresses.

  3. Classify usage into Chat, Codex, Agents, or Other.

  4. Determine costs using billed amounts, estimates, or credits and the workspace credit rate.

  5. Transform the source results into standardized AI consumption fields.

  6. Load one record per user, day, and client into aiConsumption.

Data flow: ChatGPT Workspace Admin API → Yarken Advanced Integration → FOCUS-aligned transformation → AI Usage Data → Analytics > AI Consumption.

ChatGPT Admin API endpoints

Read-only API

Purpose

Request behavior

GET /v1/analytics/workspaces/{workspace_id}/usage

Daily usage by user and client: credits, costs, tokens, chats, messages, and models.

Uses start_time, end_time, group_by=day, and up to 1,000 records per page; every page is read.

GET /v1/manage/workspaces/{workspace_id}/users

Workspace user list and email lookup.

Up to 200 records per page; every page is read.

Each synchronization covers up to 90 days. If either required API request fails, Yarken does not load partial records. Workspace usage already includes Codex activity, so this connector does not duplicate its cost.


How ChatGPT Workspace data is transformed

Record granularity and services

Yarken creates one record per user × usage day × ChatGPT client. For example, ChatGPT web and Codex CLI used by the same person on one day produce separate rows.

Service

Clients

Chat

ChatGPT web, desktop, iOS, and Android.

Codex

Codex CLI, Codex web, IDE, desktop, GitHub, and similar clients.

Agents

ChatGPT agents.

Other

New or unsupported client classifications.

Map tokens and credits

Input, cached-input, output, and total tokens remain on the same client-level record. The charge is credit-based, so Yarken does not split the row into separate cost meters for each token type.

Field

Value

consumed_quantity

Total tokens.

consumed_unit

tokens

pricing_quantity

Credits consumed.

pricing_unit

credits

input_tokens

Uncached input tokens.

cached_tokens

Cached input tokens.

output_tokens

Output tokens.

total_tokens

Total token count.

Pricing unit: ChatGPT Workspace stores unit prices per credit, not per token or per million tokens.

Identify the main model and pricing category

OpenAI supplies usage by client and, separately, by model, but not both together. Yarken labels a client row with the service's main model for the day: the model using the most credits, or the most tokens if no credits were consumed. When several models were used, the row does not provide a complete model-by-model breakdown. Chat usage may have model other.

Reported speed

Pricing category

standard

Standard

fast

Premium

Not applicable

Empty, including some Chat usage.

Determine costs

Yarken uses the first available value: (1) cost_usd billed cost; (2) estimated_cost_usd estimate; or (3) credits multiplied by the workspace's credit rate when neither cost value is available. The resulting amount populates list, contracted, billed, and effective cost.

Unit price per credit = row cost ÷ credits consumed. Chat usage included in a seat can consume no credits and have zero usage cost while still recording token and message metrics. Seat subscription fees themselves are outside the integration.


Data loaded into AI Usage Data

Yarken stores FOCUS-aligned rows in aiConsumption, one row per user, day, and client. All amounts are USD. Raw API responses are used during ingestion and then discarded; they are not available as user-facing raw records.

AI consumption field reference

Provider, workspace, and attribution fields

Field

Description

record_id

Unique record ID derived from the transaction ID with a Usage suffix.

transaction_id

Stable workspace, user, day, and client ID.

collector_source

ChatGPT Workspace Analytics

provider_name, publisher_name, invoice_issuer_name

OpenAI

service_name

Chat, Codex, Agents, or Other.

service_category

AI and Machine Learning

billing_account_id

Organization ID if provided, otherwise Workspace ID.

sub_account_id

Workspace ID.

user_id

ChatGPT user ID.

resource_name

User email or name.

Billing periods and charge classifications

Field

Description

billing_period_start

First day of the billing month (UTC).

billing_period_end

First day of the following month, exclusive.

charge_period_start

Start of the usage day (UTC).

charge_period_end

Start of the next day, exclusive.

charge_category

Usage

charge_frequency

Usage-Based

charge_description

Client and main model.

ingested_at

UTC collection timestamp.

Service, model, tokens, and credits

Field

Description

pricing_category

Standard, Premium, or empty.

sku_id

Model, speed, and client combination.

sku_meter

credits

model_name

Main model; Chat may show other.

model_version

Version derived from model identifier.

modality

text

consumed_quantity, consumed_unit

Total tokens, in tokens.

pricing_quantity, pricing_unit

Credits used, in credits.

input_tokens

Uncached input tokens.

cached_tokens

Cached input tokens.

output_tokens

Output tokens.

total_tokens

Total tokens.

Costs and region fields

Field

Description

billing_currency

USD

list_unit_price, contracted_unit_price

Cost per credit.

list_cost, contracted_cost, billed_cost, effective_cost

Source billed, estimated, or derived row cost.

region_id, region_name

Empty; ChatGPT does not report a usage region.

Example: daily Codex consumption record

Field

Example value

charge_period_start

2026-08-01T00:00:00Z

charge_period_end

2026-08-02T00:00:00Z

resource_name

user@example.com

service_name

Codex

charge_description

Codex CLI gpt-5.6-sol

model_name

gpt-5.6-sol

pricing_category

Premium

input_tokens

2,396,861

cached_tokens

61,181,952

output_tokens

280,230

total_tokens

63,859,043

pricing_quantity

3,186.39

pricing_unit

credits

list_unit_price

0.07

billed_cost

223.05

billing_currency

USD

This example describes daily Codex usage totaling 3,186.39 credits and USD 223.05 of billed cost. The example unit price is rounded.


Run and monitor the Advanced pipeline

  1. Go to Admin > Pipelines > Pipelines and select ADVANCED.

  2. Locate the ChatGPT Workspace pipeline deployed for your environment.

  3. Select Run if you need to execute the integration immediately.

  4. Check run status and run history to confirm success.

See Manage Advanced pipelines for common pipeline controls.


Review and validate ChatGPT Workspace data

  1. Go to Designer > Consumption > AI, and select the reporting year and month.

  2. Review the expected Spend and Last Load values.

  3. Go to Analytics > AI Consumption.

  4. Identify records where Provider is OpenAI and Collector Source is ChatGPT Workspace Analytics, where these fields are available.

  5. Check users, clients, services, main models, token quantities, credit consumption, and costs.

  6. Compare usage-based amounts with the workspace source for the same reporting period.

Reconcile credit and cost data

  • Confirm that Chat and Codex are reported separately and that Codex activity is not duplicated.

  • Review separate records when one user works across multiple clients on the same day.

  • Include usage with zero credits when validating token totals, but do not treat it as additional cost.

  • Distinguish estimated costs from billed source amounts.

  • Exclude recurring seat subscription fees from usage-based reconciliation.

OpenAI may provide an estimate before the final billed cost becomes available, so recently ingested records may differ from later source reports.


Data privacy and security

The integration stores user-level usage metadata, including user IDs, email addresses, client names, service and model details, tokens, credits, usage dates, and cost. Yarken does not retrieve conversation content, prompts, model responses, or code through this integration.


Troubleshooting

Issue

Possible cause

Recommended action

Incorrect key type

Project key, Codex token, or OpenAI API Platform Admin key supplied.

Create a ChatGPT Workspace Admin key in the ChatGPT Admin Console.

401 Authentication failed

Invalid, revoked, expired, or incorrect-platform key.

Check key status and replace the key when needed.

403 Forbidden

Missing read permissions.

Confirm Read access to Usage limits, Costs, Workspace/Enterprise analytics, Codex analytics, and Users.

404 Not found

Incorrect Workspace ID or key belongs to a different workspace.

Verify the UUID in chatgpt.com/admin.

Connected, but no records

Pipeline failed or source period has no records.

Review pipeline status, history, and the reporting period.

Multiple records for one user and day

The user worked in several clients.

Review the client and service dimensions.

Chat record has zero cost

Seat-included usage did not consume credits.

Review tokens independently of credits.

Model does not show every model used

Only main model is retained for the client row.

Do not interpret the row as a full model cost split.

Recent cost differs from source

The amount may be an estimate.

Compare with the source after billed data is available.

Subscription fees are missing

Seat fees are not collected.

Review subscription costs separately.

For generic issues, see Troubleshoot Advanced Integrations.


Current limitations

  • Daily granularity: One record per user, day, and client.

  • Main model: No complete model-level cost split when multiple models were used for the same service.

  • Estimated cost: Billed amounts may become available after initial synchronization.

  • Seat subscription fees: Not collected by this integration.

  • Synchronization window: Up to 90 days per run.

  • Region: Not reported by the source.

  • Conversation content: Prompts, responses, code, and files are not retrieved.


FAQs

Can Yarken read employees' chats, prompts, or code?

No. This integration retrieves usage counts, credits, tokens, models, costs, and attribution data, not conversation content.

Why does one user have several records for a day?

There is one record per ChatGPT client used on the day, such as ChatGPT web and Codex CLI.

Why does Chat usage sometimes have zero cost?

Some Chat usage is included in the seat subscription and consumes no extra credits. Token usage is still recorded.

Does Yarken count Codex cost twice?

No. Workspace usage already includes Codex, so Yarken ingests it once.

Does this integration use the same Admin key as OpenAI API Platform?

No. Both key types can start with sk-admin-, but they belong to separate OpenAI platforms.

Why is a model shown as other?

ChatGPT source analytics may report Chat usage as other. Other client rows use the main model determined from available source usage.

How is a unit price stored?

As cost per credit, not cost per individual token or per million tokens.

Are seat subscription fees included?

No. Only usage-based credits and costs are collected.

How do I disconnect?

Revoke the Admin key under ChatGPT Admin Console > Credentials > Admin keys, or remove the connection in Yarken.