get_usage
curl --request GET \
--url https://ndi-api.nace.ai/v1/usage \
--header 'X-API-Key: <api-key>'{
"buckets": [
{
"bytes_ingested": 123,
"credits": 123,
"jobs": 123,
"key": "<string>",
"pages": 123,
"unfinalized_jobs": 123,
"units": 123
}
],
"credits_total": 123,
"group_by": "<string>",
"period_end": "2023-12-25",
"period_start": "2023-12-25",
"units_total": 123
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}get_usage
Aggregate job units for a billing period. Cost class: fast.
credits is what the period bills; units are measured work, including
failed and cancelled jobs that are not billed. The admission allowance also counts failed and cancelled
work and in-flight reservations, so a quota_exceeded credits_used can
exceed credits_total.
pages and bytes_ingested aggregate the per-job processing volume
the workers record at completion time. credits sums only jobs whose
usage is final; unfinalized_jobs counts the ones still open.
GET
/
v1
/
usage
get_usage
curl --request GET \
--url https://ndi-api.nace.ai/v1/usage \
--header 'X-API-Key: <api-key>'{
"buckets": [
{
"bytes_ingested": 123,
"credits": 123,
"jobs": 123,
"key": "<string>",
"pages": 123,
"unfinalized_jobs": 123,
"units": 123
}
],
"credits_total": 123,
"group_by": "<string>",
"period_end": "2023-12-25",
"period_start": "2023-12-25",
"units_total": 123
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}Query Parameters
Response
Successful Response
Usage report covering [period_start, period_end].
units_total sums measured work, including free failed and cancelled jobs.
credits_total sums final billable credits for the period.