External Publication
Visit Post

Feature Request: include API key name (or group_by=api_key_name) in the Usage & Costs API responses

OpenAI Developer Community June 29, 2026
Source

Our team manages a large number of API keys, and we use the Usage and Costs endpoints (/v1/organization/usage/*, /v1/organization/costs to break down spend by key. Today these endpoints group only by api_key_id, which makes it hard to tell at a glance which key is which. With many keys, our teams cannot tell at a glance which key maps to which product surface, so reconciling spend means manually and frequently cross-referencing IDs and building mapping logic against our own records.

We’d like these endpoints-- most importantly the costs endpoint, to include api_key_name as a new group_by option to avoid extra lookups to map IDs back to keys.

Discussion in the ATmosphere

Loading comments...