Get the organization's usage for a month
Cost of one calendar month for the organization and each of its projects, with the budget it is measured against.
Cost of one calendar month for the organization and each of its projects, with the budget it is measured against.
Headers
AuthorizationRequiredBearer <SONIOX_API_KEY>Query parameters
monthstringCalendar month as YYYY-MM, UTC. Defaults to the current month.
Response
200
OK
monthRequiredstringThe month, as YYYY-MM.
usage_usdRequiredstringCost of the month across every project.
free_usage_usdRequiredstringPart of the usage covered by granted balance.
invoiced_usage_usdRequiredstringPart of the usage that is invoiced.
api_usage_usdRequiredstringPart of the usage made through the API.
playground_usage_usdRequiredstringPart of the usage made in the Soniox Console playground.
monthly_budget_usdRequiredstringOrganization budget in effect. Null for a month other than the current one: only today's budget is stored, so it says nothing about a month that has closed.
monthly_budget_notification_usdRequiredstringUsage at which the organization is emailed. Null when unset, and for a month other than the current one.
remaining_budget_usdRequiredstringBudget minus usage, never below zero. Null for a month other than the current one.
budget_exhaustedRequiredbooleanUsage reached the budget and requests are refused. Null for a month other than the current one.
projectsRequiredarray<object>Projects with usage this month, highest cost first. Projects deleted since are included, so the per-project costs add up to usage_usd.
Errors
OK
{
"month": "string",
"usage_usd": "string",
"free_usage_usd": "string",
"invoiced_usage_usd": "string",
"api_usage_usd": "string",
"playground_usage_usd": "string",
"monthly_budget_usd": "string",
"monthly_budget_notification_usd": "string",
"remaining_budget_usd": "string",
"budget_exhausted": true,
"projects": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"usage_usd": "string",
"free_usage_usd": "string",
"invoiced_usage_usd": "string",
"api_usage_usd": "string",
"playground_usage_usd": "string",
"monthly_budget_usd": "string"
}
]
}Bad Request
{
"status_code": 0,
"error_type": "string",
"message": "string",
"validation_errors": [
{
"error_type": "string",
"location": "string",
"message": "string"
}
],
"request_id": "string",
"more_info": "string"
}Unauthorized
{
"status_code": 0,
"error_type": "string",
"message": "string",
"validation_errors": [
{
"error_type": "string",
"location": "string",
"message": "string"
}
],
"request_id": "string",
"more_info": "string"
}Forbidden
{
"status_code": 0,
"error_type": "string",
"message": "string",
"validation_errors": [
{
"error_type": "string",
"location": "string",
"message": "string"
}
],
"request_id": "string",
"more_info": "string"
}Not Found
{
"status_code": 0,
"error_type": "string",
"message": "string",
"validation_errors": [
{
"error_type": "string",
"location": "string",
"message": "string"
}
],
"request_id": "string",
"more_info": "string"
}Too Many Requests
{
"status_code": 0,
"error_type": "string",
"message": "string",
"validation_errors": [
{
"error_type": "string",
"location": "string",
"message": "string"
}
],
"request_id": "string",
"more_info": "string"
}Internal Server Error
{
"status_code": 0,
"error_type": "string",
"message": "string",
"validation_errors": [
{
"error_type": "string",
"location": "string",
"message": "string"
}
],
"request_id": "string",
"more_info": "string"
}Get the organization balance GET
Prepaid balance and billing setup of the organization. Poll it to alert on a balance below a threshold of your own.
Get the organization's usage summary GET
Cost and activity per day, for each project of the organization and each model it used. Projects since deleted are included, so the per-project costs add up to the total. The window is half-open, [start_time, end_time), aggregated by whole UTC day, and must not cover more than 366 days.