apiusage.info
Free value-added services
AI office tools AI improves efficiency

apiusage.info

apiusage.info – makes it possible to increase the efficiency of AI-driven tasks, making them more efficient and simpler.

Tags:

What is apiusage.info?

apiusage.info was originally an open-source tool designed to help users monitor the usage of the OpenAI API and estimate associated costs. It was created by developer Ke Fang, with the aim of addressing the issue of difficulty in identifying which specific models and time periods are responsible for high billing amounts.

It should be noted that as of August 26, 2026, the homepage of the original domain has become a directory of general tools; the old OpenAI usage dashboard is no longer available. The old projects can still be viewed in public code repositories, but the current domain should not be considered to offer a service for cost tracking that is still in operation.

The main functions of the original tool

Calculate costs based on the model.

The older version of the program would read the usage data provided by OpenAI, and convert the input and output tokens into estimated costs based on the pricing of those models. It supported models that were available at that time, such as GPT-3.5, GPT-4, text embeddings, and Whisper.

View abnormal consumption on an hourly basis

Users can aggregate the usage for a day on an hourly basis and identify periods of sudden increase on the timeline. This approach is useful for determining whether a certain scheduled task, batch processing operation, or retry of an error is responsible for abnormal costs.

Bar charts and pie charts

The older version of the page allowed switching between bar charts and pie charts. Bar charts highlighted the changes over different time periods, while pie charts were used to show the proportion of each model in the total cost.

Date and time granularity

The code provides parameters for the date and the level of aggregation; it allows one to specify a date and adjust the time grouping. The results are estimates calculated based on usage and predefined unit prices, and they do not constitute official bills or invoices.

Local or private deployment

The project is implemented using Python and Flask; users can clone the code and run it on their own. Self-hosting facilitates the inspection of the code as well as control over the operating environment, but older versions of the code require modifications to their interfaces, models, and security features first.

Can it still be used directly right now?

The online version cannot be used directly following the old tutorials. The homepage of the current domain is no longer the OpenAI cost dashboard; meanwhile, the public code still makes use of the old usage interfaces and employs model names and prices from around 2023.

  • The old interface may be invalid, have changed permission requirements, or return a different data structure.
  • The list of models in the code does not include the numerous models that were released later.
  • Hard-coded unit prices can no longer reflect the current prices of the OpenAI API.
  • The costs displayed on the page serve only as examples of past projects and cannot be used for current financial calculations.

What is included in open-source code?

  • Flask web application entry point and page routing.
  • The logic for retrieving usage data for a specified date.
  • Code for calculating fees by model, time, and token type.
  • Prepare the logic for timelines and datasets for front-end charts.
  • Page templates, static resources, and deployment configurations.

The code repository is licensed under GPL-3.0, which permits research, modification, and redistribution; however, any derived versions must comply with the relevant open-source requirements. The fact that the repository is made public does not mean that the author will continue to maintain the online service.

Self-hosted transformation approach

  1. Clone and review the complete code; do not give the actual keys to unverified older versions.
  2. Remove the statements in the logs that output keys, and use a server-side key management tool instead.
  3. Rewrite the method for obtaining usage and cost data in accordance with OpenAI’s current official documentation.
  4. Change the model price from a hardcoded value to an updatable configuration, and record the date on which the price takes effect.
  5. Set clear alerts for unknown models; silent handling at zero cost is not allowed.
  6. Add project, user, API key, or business tag dimensions to identify the source of costs.
  7. Add access control, request restrictions, audit logs, and transmission encryption.
  8. Perform reconciliation using samples from the official billing data; once the estimation errors are identified, they can be used for routine monitoring.

A more reliable method for cost statistics

In the production environment, it is necessary to record the values of the usage fields returned after each model invocation, and to associate these values with the respective model, project, user, and business task. By then calculating the cost using the official unit prices valid on the day of the invocation, it is possible to avoid discrepancies caused by older prices or interfaces.

Organizations should also give priority to using the official consumption and cost interfaces or consoles provided by the supplier. Third-party dashboards are suitable for secondary analysis and should not replace the official invoices.

Which users are it suitable for

  • Python developers who wish to learn about the structure of Flask data dashboards.
  • AI application teams that need to refer to the logic for aggregating token costs.
  • Technicians who are prepared to set up API usage monitoring and willing to maintain the relevant code.
  • Study users who made use of OpenAI’s early APIs and model pricing mechanisms.

Advantages of the project

  • The code is relatively small in size, which makes it easy to understand the entire process from usage data to charts.
  • The costs are broken down by model and hour, which provides a clear approach for identifying issues.
  • With an open-source license, it is possible to modify and host it on one’s own while remaining compliant with relevant regulations.
  • It simultaneously displays changes over time and the proportion of each model, making it suitable for beginners in cost analysis.

Important limitations and security risks

  • The original online service is no longer available; the content of the current domain is used for a different purpose than that of the old project.
  • The old code relies on the changed OpenAI interfaces, so it cannot guarantee successful requests.
  • Both the model name and unit price are outdated, which leads to significant errors when performing direct calculations.
  • The code may handle unknown models at zero cost, resulting in an underestimation of the actual expenses.
  • The project does not come with built-in multi-user permissions, enterprise-level auditing, or a production-grade alerting system.
  • No API cost dashboard should require users to expose high-privilege keys in browsers or untrusted services.

API key risks

The old version of the documentation stated that keys were stored only locally in the browser, but the current publicly available server code saves the keys submitted via forms in the Flask session; there are also statements that print these keys to the server logs. These two descriptions are not consistent with each other, so real production keys should not be used in the unmodified old code.

Even when deploying it manually, it is necessary to use keys with minimal permissions, protected server environment variables, and log anonymization. Once a key appears in public repositories, browser scripts, or logs, it should be revoked and replaced immediately.

apiusage.info prices

The History Project is free and open-source software; there are no membership fees or different version packages. While it can be deployed on one’s own, costs related to servers, databases, monitoring, and maintenance may still arise. The costs associated with using the OpenAI API are charged separately by OpenAI.

As of August 26, 2026, the tool catalog available on the current domain and the old open-source cost dashboard are not the same online service; the other tool tags or prices displayed on the page cannot be considered as pricing for the old projects.

Privacy and data processing

Cost analysis requires access to account usage data or call records, which are considered sensitive operational data. Those responsible for deployment should determine exactly which fields need to be recorded, for how long they should be retained, and who is allowed to view them; at the same time, it is necessary to avoid saving the content of requests and user inputs.

The original project did not provide a complete set of privacy, access control, and auditing mechanisms that could be used directly by enterprises. Before processing real business data, code audits must be carried out, and access and deletion procedures must be established in accordance with the regulations of the relevant region.

Frequently Asked Questions

Can apiusage.info still be used to check OpenAI costs?

The original online dashboard is no longer available on the homepage of the current domain name. The current domain displays a list of general tools, and it is no longer possible to use the old tutorial methods to enter keys in order to view costs.

Is apiusage.info a free tool?

The historical project is free and open-source; there are no membership plans. Self-deployment incurs infrastructure costs, while the fees for invoking the models are still charged by the interface provider.

Which models are supported by apiusage.info?

The old version of the code includes only GPT-3.5, the earlier versions of GPT-4, older embedding models, and Whisper – it does not cover the full range of models available today.

Can the OpenAI API key be entered into the older version of the program?

It is not recommended. Publicly available code poses risks related to session storage and the exposure of logging keys; it is necessary to make security-related modifications first, and to use test keys with minimal permissions.

Can apiusage.info be deployed on one’s own?

Public repositories can be studied and deployed, but they need to have their usage interfaces rewritten, model prices updated, key handling improved, and access controls added before they can be used in practice.

Is apiusage.info an open-source project?

Yes. The historical project code is licensed under the GPL-3.0 license, but the general tools directory on the current domain name does not automatically become part of the same open-source project as a result.

©️Copyright notice: Unless otherwise specified, all articles on this site are copyrighted bySharing of AI toolsAll content on this site is original; without permission, no individual, media outlet, website, or organization may reproduce, copy, or otherwise distribute it, nor may they create mirrors of it on servers that are not owned by this site. Otherwise, we reserve the right to take legal action against such parties in accordance with the law.

Tools similar to apiusage.info