OpenAI can now group reported cost by API key ID, but the result is still ambiguous when nobody can map that ID to the workloads and owners behind it. On August 4, 2026, OpenAI added an API-key dimension to its Usage and Costs dashboards and to its organization Usage and Costs APIs. The change can make provider charges easier to allocate when a team's API keys already separate the work it needs to explain.
The useful outcome is a clear decision: keep the current key layout when each reported total already answers the relevant cost question, or separate a shared key when future workload-level attribution justifies the operational change. To reach that decision, teams need to understand what OpenAI reports and where its reporting stops. They also need to keep visibility separate from key administration and spend enforcement.
Business ownership remains outside OpenAI's report
OpenAI's API changelog names the changed surfaces. Its August 4 entry says the Usage and Costs dashboards, Usage API, and Costs API now support an API-key dimension. In the public API references, the reporting object is api_key_id, which identifies an API key without exposing its secret value.
That identifier does not name a production service, business process, accountable owner, customer, or application end user. OpenAI can associate recorded activity with a key ID. The team must supply the local meaning of that ID through the way it issues and operates keys.
A key used by one workload with a known owner can support direct allocation. A key copied into several services produces one precise provider identifier for work that the business may still be unable to divide. The second result is a per-key total with ambiguous ownership.
The Completions usage method can filter and group by key ID
OpenAI's Completions organization-usage reference documents GET /organization/usage/completions. The optional api_key_ids parameter filters the query to specified keys. The group_by parameter can include api_key_id with project_id, user_id, model, batch, and service_tier, in supported combinations.
The time settings determine the resolution and amount of data in each request. The endpoint supports 1m, 1h, and 1d bucket widths, with 1d as the default. Daily queries default to 7 buckets and allow up to 31; hourly queries default to 24 and allow up to 168; minute queries default to 60 and allow up to 1,440.
The reference defines start_time as inclusive and end_time as exclusive. Results use cursor pagination through page and next_page. These details matter when an operator compares adjacent periods or collects more buckets than one response returns.
OpenAI's changelog refers to the broader Usage API, while the public method checked for this article was the Completions usage endpoint. The documented fields above should not be assumed to describe every method in the Usage API family.
The Costs API can group daily cost by key ID
OpenAI's organization Costs reference documents GET /organization/costs. Here too, api_key_ids filters results to specified keys. The group_by parameter supports api_key_id, project_id, and line_item, including supported combinations.
The Costs endpoint currently uses daily buckets only. Its limit accepts 1 through 180 buckets and defaults to 7. The time range again has an inclusive start_time and an exclusive end_time, while has_more and next_page show when another page is available.
The query lets an organization ask OpenAI for daily cost grouped by the key ID associated with the charge. Grouping by project or line item can add provider context. It cannot divide two local workloads that used the same key within the same reported grouping.
Shared keys preserve the attribution problem
When a customer-facing feature and a batch process use the same API key, the provider can group both under the same api_key_id. The resulting total is exact at the documented key level, but the key alone does not show how much came from either workload. The same problem appears when one key is shared across owners or environments.
Separate keys are useful when the business needs separate ownership or cost allocation. They are unnecessary when the workloads are intentionally operated and budgeted together, because a combined result already answers the relevant business question. This is a local design choice, not a requirement in OpenAI's announcement.
BaristaLabs interprets per-key data as evidence of how well the current key layout supports ownership. A shared result can expose an existing gap, but it does not resolve the gap automatically. OpenAI supplies the identifier, while people remain responsible for deciding whether a credential change is justified for production work.

Visibility, administration, and enforcement answer different questions
Visibility shows which identifier OpenAI associated with recorded usage or cost. Administration determines who can create, assign, rotate, and revoke credentials. Enforcement determines when requests are blocked because a limit or policy applies. Treating one of these functions as a substitute for the others creates expectations that the documented change does not support.
Our analysis of OpenAI administration with Terraform covers projects, service accounts, access, and selected settings under reviewed desired state. OpenAI's Terraform guidance keeps service-account API keys outside Terraform, so reporting by api_key_id does not make key lifecycle management automatic. A team still needs an approved process for issuing, deploying, rotating, and removing each credential.
The OpenAI hard-spend-limit guide covers enforcement at monthly project and organization scopes. Those limits can cause affected requests to fail with insufficient_quota. The August 4 reporting change does not document key-level budgets, alerts, or hard limits, so a cost row should not be read as a control that can stop spend.
Public documentation leaves lifecycle and accounting questions open
No authenticated OpenAI organization was used for this source review. The dashboard controls and live API response payloads were therefore not exercised. The changelog states that the dashboards and APIs support the dimension, but parity between dashboard and API results remains unverified.
The public sources do not state whether OpenAI backfilled api_key_id for activity recorded before August 4. They also do not explain what a report shows after a key is deleted or rotated. Until OpenAI documents those cases or a team verifies them in its account, historical and lifecycle behavior remains unknown.
Shared-key separation remains limited by the reporting object itself. The inspected references do not describe a second field that can infer separate local workloads behind one key. A project or line-item grouping can provide more context when those fields differ, but it cannot guarantee workload or end-user attribution.
The Costs API documentation also does not promise invoice reconciliation. Daily buckets and line items can support allocation and trend analysis, but the sources do not define how API totals relate to credits, adjustments, taxes, or invoice timing. Finance teams should keep that distinction visible until they compare the surfaces with their own billing records.
Decide whether each production key already answers the ownership question
Inspect whether each production API key already maps to one workload and one owner. Use the key ID for the comparison because that is what OpenAI reports. If the mapping is clear, the new dimension can improve future cost allocation without changing the credential layout.
If a key is shared, decide whether future attribution justifies separating it. That decision should account for the production work needed to issue, deploy, rotate, and retire credentials safely. The reporting feature can inform the decision, but it cannot make the operational or business tradeoff.
Adopt the new dimension as a reporting input when each production key has a clear workload and owner. If a shared key serves work that the business must cost or own separately, separate it for future use. Otherwise, keep it shared and accept that its row contains combined cost rather than false precision.
BaristaLabs' AI consulting helps teams connect provider usage data to workload ownership and the OpenAI administration changes that follow. This work is useful when key separation affects production deployment, credential rotation, and cost decisions across engineering and finance.
AI cost ownership
Make provider cost data answer a business question
Connect API key IDs to the workloads, owners, and credential changes needed for reliable allocation without confusing reporting with enforcement.
Best fit for teams operating multiple OpenAI API workloads across products, environments, or cost owners.
Turn this idea into a pilot
Which workflow should go first?
Use the readiness check to compare impact, effort, risk, owner, and next step before booking a call.
- 3-5 minutes
- Deterministic score
- No sensitive data
Practical AI Workflow Notes
Want more practical AI operations ideas?
Get short notes on applying AI inside real small-business workflows — from document handling and customer follow-up to internal reporting, compliance, and automation guardrails.
