To track OpenAI API spend by product feature, log each API request in your application with a stable feature ID, capture the endpoint’s returned usage, and reconcile those records against OpenAI’s Usage and Costs reports. OpenAI provides useful breakdowns such as project, API key, and model, but its reporting does not establish a universal product-feature tag. Feature-level attribution is therefore your own accounting layer.
What OpenAI reports—and what you must add
OpenAI’s Usage reporting can break activity down by supported dimensions such as project, user, API key, model, batch, and service tier. The Costs endpoint supports project and line-item groupings. These dimensions help explain where activity or spend occurred, but they do not identify your application’s product features unless your architecture maps each feature to a distinct provider scope. If several features share a project or key, record a feature ID in your own telemetry. See the Usage API reference for current endpoints and supported groupings.
As an Amazon Associate I earn from qualifying purchases.
Keep activity and financial reporting distinct. Use Usage data to investigate requests and token or modality activity; use the Costs endpoint or the dashboard’s Costs tab for spend and invoice-oriented reconciliation. OpenAI says the two may differ slightly and recommends Costs for financial purposes. Costs currently supports daily buckets, so align your internal comparison to UTC days.
Free tools Windows power users keep installed
One-click scans. No signup required.
Build a feature-level request ledger
Choose stable feature IDs
Use durable identifiers such as chat_reply, document_summary, or support_search, rather than labels that may change in your interface. Decide how to classify shared orchestration, background work, retries, and a request that serves multiple features. Store the chosen feature ID alongside an application request or correlation ID so the label survives beyond a single UI event.
#1 Best Overall
Capture the request and actual usage
For every API call, record a UTC timestamp, feature ID, endpoint, requested and returned model identifiers when available, project and API-key identity when available, request status, and a provider request/response identifier when the endpoint exposes one. Save the endpoint’s returned usage object; do not estimate API usage from visible text length. Depending on the endpoint and model, usage can include input, output, cached-input, reasoning, audio, image, or other modality-specific details. Field names differ: the Usage Dashboard guidance distinguishes Chat Completions fields such as prompt_tokens and completion_tokens from Responses fields such as input_tokens and output_tokens. Consult OpenAI’s API usage dashboard guidance for endpoint-specific details.
For streamed Chat Completions, request final usage with stream_options: {"include_usage": true}. The final usage chunk contains usage for the full request, but an interrupted stream may end before that chunk arrives. Record such usage as missing or pending recovery—not zero. This instruction is specific to Chat Completions; check the reference for the streaming endpoint you use.
Keep fields honest
A ledger row might include event_time_utc, feature_id, request_id, endpoint, model, project_id, api_key_id, batch_id, service_tier, token and modality usage fields, status, and an allocation or reconciliation state. Populate only fields actually available for that request. Track unknown usage as unknown rather than filling gaps with estimates presented as provider-measured values.
Rank #2
Choose projects and keys for the right reasons
Use separate projects when they improve access separation, controls, or useful project-level reporting—not automatically as a replacement for feature telemetry. OpenAI projects organize access and usage, support activity breakdowns, and allow project spend limits. If multiple features share a project, keep the feature ID in your own request records. API-key grouping can provide another operational view where supported, but a key shared across features is not proof of each feature’s cost. See OpenAI’s project management guide.
Join application events to provider usage
For synchronous calls, join your application request record to the corresponding usage record using the strongest request identifier available. Retain model, project, API key, endpoint, and time as validation dimensions. A request ID is useful only if the relevant endpoint or report exposes a compatible identifier; do not assume aggregate Usage records can be joined one-to-one to application requests.
When provider data is aggregate-only, compare your feature events within the same UTC window and provider scope. If several features share that scope, the aggregate cannot establish each feature’s exact provider-measured cost. You may allocate the aggregate internally using a documented rule, but label the result as allocated rather than directly measured. Keep an “unallocated/shared” bucket for missing stream usage, uncorrelated retries, and charges that cannot be assigned to an individual project.
Rank #3
Reconcile to Costs before reporting dollars
-
Choose a consistent scope: use the same organization, project selection, and UTC reporting window for your internal records and provider report.
Recommended Free Tools
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Inspect activity: use Usage breakdowns to investigate request and usage patterns, including available model, key, project, batch, or service-tier dimensions.
-
Compare financial records: use the Costs endpoint or Usage Dashboard Costs tab to reconcile spend by organization, project, UTC day, and line item before allocating it across features.
-
Document exceptions: keep shared or organization-level charges separate from directly attributable request costs, and state the method used for any internal allocation.
For monthly detail in the dashboard, OpenAI’s monthly usage and cost export guide describes exporting Cost data as CSV and grouping by line item. Its instructions specify selecting all projects or the intended project, using daily intervals, and choosing the full reporting month or month-to-date. The guide states that, for Enterprise customers, invoice detail for API costs is no longer provided for invoices issued from April 1, 2026; it directs those customers to the detailed Usage Dashboard export flow. Confirm the workflow applicable to your organization because reporting procedures can change.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Account for reporting boundaries
- UTC dates: the dashboard reports in UTC. Keep application timestamps and export windows in UTC to avoid shifting activity across reporting days.
- Organization separation: the Usage Dashboard does not combine separate organizations; a sub-organization is reported separately. For a combined view, use a custom Usage API workflow or organize relevant projects within one organization where appropriate.
- Scale Tier bundles: OpenAI attributes Scale Tier bundle costs to the organization rather than individual projects. Report these separately or disclose your internal allocation rule; project-level usage does not make the bundle charge a directly measured project cost.
- Playground activity: Playground calls count toward API usage under the same usage rules and pricing as application calls. Include them in scope or filter them where available dimensions allow.
- Older batch records: the Batch API reference says batch usage fields are populated only for batches created after September 7, 2025. Older batch records may not include those fields. See the Batch API reference.
- Interrupted streams: a missing final usage chunk is missing data, not evidence of zero usage.
Compare feature costs without misleading yourself
Raw token totals or price per million tokens alone do not show which implementation is more economical. OpenAI notes that tokenization and generated output or reasoning can cause total task costs to differ even when a model’s listed token price is lower. Compare reconciled dollars per completed feature outcome, alongside input/output and cached-token mix, modality usage, model, service tier, batch versus synchronous path, retries or failures, missing-usage rate, and quality or completion rate. For token categories and cost-comparison context, see OpenAI’s token guide.
Keep provider-measured cost distinct from internally allocated shared cost. A useful report can show both, but should label them separately so a reader can tell which figures come from OpenAI’s cost records and which depend on your allocation assumptions.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




