Team Management
Get API key usage
Changed onReturns an API key's cost over a time period, in total and by price.
get/api-keys/{id}/usage
Request
- Base URLhttps://admin-api.exa.ai/team-management
- URLhttps://admin-api.exa.ai/team-management/api-keys/{id}/usage
- AuthAPI key in header x-api-key
Path parameters
idstring required
The key's publicId. The key's current secret is also accepted for backward compatibility.
Query parameters
start_datestring date-time
Start date for the usage period (ISO 8601 format). Defaults to 30 days ago. Must be within the last 6 months (180 days).
end_datestring date-time
End date for the usage period (ISO 8601 format). Defaults to current time.
group_by'hour' | 'day' | 'month'
Has no effect on the response.
Response
Usage data retrieved successfully
Example response
{
"total_cost_usd": 45.67
}Changes
- info
for the
pathrequest parameterid, the format was generalized fromuuidto no format - info
added the optional property
to the response with the status
- info