Get usage
/v1/usage Needs an API keySummarise your organization's calls over the last days UTC days, today included.
days is 7, 30 or 90. Calls made by every key of the organization count, and so do those made from the console.
Query parameters
daysintegerHow many UTC days to cover, today included.
73090Response
Your workspace's calls over the window. Your organization's calls over a window of days, with money as decimal strings in USD.
Days are UTC calendar days. The window is today (UTC) and the days before it, so its last day is still filling; totals.previous covers the same number of whole days immediately before the window. A call counts on the day it was created.
daily has one entry per day of the window, oldest first, including days with no calls. by_tool and by_api_key list the most charged first, then the most called, and are capped.
totalsobjectThe window's totals.
totals.callsintegerCalls made.
totals.succeededintegerCalls that succeeded.
totals.failedintegerCalls that failed.
totals.pendingintegerCalls still running.
totals.charged_usdstringWhat the calls cost you.
totals.previousobjectThe same totals for the window of equal length just before this one.
totals.previous.callsintegerCalls made.
totals.previous.succeededintegerCalls that succeeded.
totals.previous.failedintegerCalls that failed.
totals.previous.pendingintegerCalls still running.
totals.previous.charged_usdstringWhat the calls cost you.
dailyarray of objectOne entry per day of the window, oldest first.
daily.datestringThe UTC day.
Format date.
daily.callsintegerCalls made.
daily.succeededintegerCalls that succeeded.
daily.failedintegerCalls that failed.
daily.charged_usdstringWhat the calls cost you.
by_toolarray of objectThe window's calls by tool, most charged first.
by_tool.toolstringThe tool called.
by_tool.callsintegerCalls made.
by_tool.succeededintegerCalls that succeeded.
by_tool.failedintegerCalls that failed.
by_tool.charged_usdstringWhat the calls cost you.
by_api_keyarray of objectThe window's calls by API key, most charged first.
by_api_key.api_keyobjectNull for calls made without a key, such as from the console's playground.
by_api_key.api_key.idstringThe API key's ID.
by_api_key.api_key.labelstringThe API key's label.
by_api_key.callsintegerCalls made.
by_api_key.charged_usdstringWhat the calls cost you.
The request was refused.
The API key is missing, wrong or revoked.
The request is not valid.
Too many requests with this API key.
Retry-After: Seconds until the limit resets.