curl --request GET \
--url https://ndi-api.nace.ai/v1/usage \
--header 'X-API-Key: <api-key>'{
"buckets": [
{
"bytes_ingested": 123,
"jobs": 123,
"key": "<string>",
"pages": 123,
"units": 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.
Denominated in the same cost units the front door admits work with — a caller that is rate-limited and a caller reading its bill must see the same number, or one of the two is a fiction.
pages and bytes_ingested aggregate the per-job processing volume
the workers record at completion time.
curl --request GET \
--url https://ndi-api.nace.ai/v1/usage \
--header 'X-API-Key: <api-key>'{
"buckets": [
{
"bytes_ingested": 123,
"jobs": 123,
"key": "<string>",
"pages": 123,
"units": 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
}
}Authorizations
Query Parameters
Start of the billing window, inclusive.
End of the billing window, inclusive.
Restrict to one workspace. Omit to aggregate all jobs for this API key.
Aggregation key: calendar day, job kind, or workspace.
day, kind, workspace Response
Successful Response
Usage report covering [period_start, period_end].
units_total is the sum of all bucket units for the period so a caller
can read its budget consumption without summing the page itself.