What is the Usage Dashboard?
The Usage Dashboard displays your API usage during the current and past monthly billing cycles. To access the Usage Dashboard, navigate to the Usage tab located under your organization’s Settings, or by visiting https://platform.openai.com/account/usage.
The usage dashboard has two views: Cost and Activity. Depending on your current view, the Export button allows you to download the Cost or Activity data for your organization if you are an owner of an organization. Please note that you can export up to 60 days of data and the data may be delayed. All timestamps are based on UTC.
View by activity
The usage dashboard and usage export function exposes metrics on an API key level after turning on tracking. Please note that API Key created after Dec 20, 2023 have tracking turned on by default.
This makes it simple to view usage on a per feature, team, product, or project level by having separate API keys for each.
You can select and view the usage broken down by top users in your organization, and, if your organization is an enterprise customer with a consolidated billing structure, the top organizations by usage, and top API keys.
Is every single user's API key usage tracked in my organization?
APIs are associated at the user level instead of the org level for security reasons and can be found in the user Settings. API keys created after December 20, 2023 are tracked by default, and historical API keys can be opted-in to being tracked when the user enables tracking.
Because API keys are referenced by the Default Organization that the user belongs to, tracking will also only show up in the Default Organization's Usage Dashboard. This default can be update in the user Settings for a user belonging to multiple organization. In order for the admins of one organization to track all API keys generated by its users, each user needs to ensure that their API keys have tracking enabled and their Default Organization is set up to the same organization.
View by cost
In this view, you can monitor your daily costs, your monthly spend, and the credit grants for the current and previous months. Owners can also see past invoices here as well.
Using the Usage API to view your API activity
The Usage API provides programmatic access to your OpenAI Organization’s activity and spending data. Use it to:
Integrate data into existing reporting tools
Generate custom reports
Set up alerts by polling the API
Usage API
Developers can use the following endpoint to retrieve real-time data on API activity across their organization.
/v1/organization/usage/{completions, images, audio, embeddings, moderations, vector_stores, code_interpreter_sessions}
The following query parameters filter the results:
Date and time: start_time, end_time
Time interval: interval=[1m, 1h, 1d]
Projects: project_ids
Users: user_ids
API Keys: api_key_ids
Models: models
Endpoint specific filters e.g. size for images, batch for completions
Costs API
A single endpoint that provides a detailed breakdown of API spend by invoice line item:
/v1/organization/costs
Developers can specify a query time range (start_time, end_time), with daily granularity (interval=[1d])
Costs can be filtered and grouped by project_ids.