Get This Month's Usage
const url = 'https://api.qualia.dev/v1/billing/usage';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.qualia.dev/v1/billing/usage \ --header 'X-API-Key: <X-API-Key>'This month’s usage per meter and GPU type: used, included, overage and
its dollars; the month’s overage; every metered price (gpu_hours per
GPU type); and what the organization stores now.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Successful Response
This month’s usage per meter, its overage and every metered price.
object
One meter (and GPU type) this month. Hours, except storage (GB).
object
Of billable_overage, what the sign-up credit paid; the invoice line leaves it out
object
One metered price: a GPU type’s per GPU-hour, a check’s per hour.
object
What the account stores now
What the sign-up credit paid this month; overage_usd is after it
The sign-up credit left, as on GET /v1/billing
object
What was granted: $20
What is left now; above 0
Unused credit lapses then
Example
{ "meters": [ { "gpu_type": "", "credit_quantity": "0" } ], "prices": [ { "gpu_type": "" } ], "credit_applied_usd": "0"}Invalid or missing API key
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}The key lacks credits:read or is restricted to workspaces
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}Billing is off on this deployment
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}