Paul Krill
Editor at Large

OpenAI unveils API for tracking OpenAI API usage, costs

news
Dec 5, 20241 min

Usage API monitors token usage by minute, hour, or day and includes a costs endpoint that provides a breakdown of daily spend.

AI
Credit: JarTee/Shutterstock.com

OpenAI has introduced the Usage API, an API that allows enterprises to track their activity across the OpenAI API. With the Usage API, OpenAI API usage and costs can be assessed programmatically, the company said.  

Announced December 4, the OpenAI Usage API  monitors token usage by minute, hour, or day and filters usage data by factors such as model, API key, project ID, and user ID. Users can check daily spending via a costs endpoint for budget oversight. The Usage API, OpenAI said, is built for scalability, security, and compliance, for enterprise teams to manage costs, optimize workflows, and make quicker decisions.

While the Usage API delivers granular usage data, it may not always reconcile perfectly with costs due to minor differences in how usage and spend are recorded, OpenAI said. For financial purposes, OpenAI recommends using the Costs endpoint or the Costs tab in the Usage Dashboard, which will reconcile back to a billing invoice.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author