Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

Inspect operational usage of Provider-owned configurations

Generated from the checked-in source. Do not edit this reference by hand.

GET /api/v1/providers/{provider}/configuration-usage

Installation credential or explicit platform administrator required. Provider membership and customer roles do not grant access. Uses current explicit configuration ownership and persisted managed/media request routes; includes disabled configurations and does not infer unbound legacy/static traffic. This is current-configuration operational history, not historical financial attribution, qualified commercial supply, earnings or settlement. Counts each dispatched attempt once, including retry attempts. From is inclusive, to exclusive, in epoch milliseconds; maximum range 90 days. Token sums include only complete provider-reported aggregate token usage; unknown requests and non-token media remain separately counted. Failures count persisted safe failure observations, not an inference that every unsuccessful request has one. Timing counts refer to recorded HTTP delivery, not video job completion. Totals cover the whole range regardless of model page. after is an exclusive lexical model-alias boundary, not an identity lookup; pages are live statement snapshots. No customer identity, request/key IDs, endpoint, credentials, costs or prices are returned. No upstream call or mutation. Cache-Control no-store.

Operation: getProviderConfigurationUsage.

Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.

JSON
[
{
"bearerAuth": []
}
]

Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.

Shell
curl --fail-with-body -X GET "$NIU_ORIGIN/api/v1/providers/{provider}/configuration-usage" \
-H "Authorization: Bearer $NIU_BEARER_TOKEN" \
--url-query 'from_ms=<FROM_MS>' \
--url-query 'to_ms=<TO_MS>'

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Location: query. Required.

JSON
{
"type": "integer",
"minimum": 0,
"maximum": 253402300799999
}

Location: query. Required.

JSON
{
"type": "integer",
"minimum": 1,
"maximum": 253402300799999
}

Location: query. Optional.

JSON
{
"type": "string",
"minLength": 1,
"maxLength": 256
}

Location: query. Optional.

JSON
{
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
}

No request body is declared.

Scoped operational counts; not supply or financial qualification.

Content type: application/json.

JSON
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"additionalProperties": false,
"required": [
"from_ms",
"to_ms",
"observed_at",
"totals",
"models",
"next_after"
],
"properties": {
"from_ms": {
"type": "integer"
},
"to_ms": {
"type": "integer"
},
"observed_at": {
"type": "string",
"format": "date-time"
},
"totals": {
"type": "object",
"additionalProperties": false,
"required": [
"requests",
"completed",
"execution_unknown",
"known_token_usage_requests",
"unknown_token_usage_requests",
"prompt_tokens",
"completion_tokens",
"failures",
"observed_timing_requests",
"complete_timing_requests",
"complete_total_ms"
],
"properties": {
"requests": {
"type": "string",
"pattern": "^[0-9]+$"
},
"completed": {
"type": "string",
"pattern": "^[0-9]+$"
},
"execution_unknown": {
"type": "string",
"pattern": "^[0-9]+$"
},
"known_token_usage_requests": {
"type": "string",
"pattern": "^[0-9]+$"
},
"unknown_token_usage_requests": {
"type": "string",
"pattern": "^[0-9]+$"
},
"prompt_tokens": {
"type": "string",
"pattern": "^[0-9]+$"
},
"completion_tokens": {
"type": "string",
"pattern": "^[0-9]+$"
},
"failures": {
"type": "string",
"pattern": "^[0-9]+$"
},
"observed_timing_requests": {
"type": "string",
"pattern": "^[0-9]+$"
},
"complete_timing_requests": {
"type": "string",
"pattern": "^[0-9]+$"
},
"complete_total_ms": {
"type": [
"string",
"null"
],
"pattern": "^[0-9]+$",
"description": "Sum of complete observed HTTP delivery durations; null without any complete timing. Not asynchronous job duration."
}
}
},
"models": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"requests",
"completed",
"execution_unknown",
"known_token_usage_requests",
"unknown_token_usage_requests",
"prompt_tokens",
"completion_tokens",
"failures",
"observed_timing_requests",
"complete_timing_requests",
"complete_total_ms",
"model"
],
"properties": {
"requests": {
"type": "string",
"pattern": "^[0-9]+$"
},
"completed": {
"type": "string",
"pattern": "^[0-9]+$"
},
"execution_unknown": {
"type": "string",
"pattern": "^[0-9]+$"
},
"known_token_usage_requests": {
"type": "string",
"pattern": "^[0-9]+$"
},
"unknown_token_usage_requests": {
"type": "string",
"pattern": "^[0-9]+$"
},
"prompt_tokens": {
"type": "string",
"pattern": "^[0-9]+$"
},
"completion_tokens": {
"type": "string",
"pattern": "^[0-9]+$"
},
"failures": {
"type": "string",
"pattern": "^[0-9]+$"
},
"observed_timing_requests": {
"type": "string",
"pattern": "^[0-9]+$"
},
"complete_timing_requests": {
"type": "string",
"pattern": "^[0-9]+$"
},
"complete_total_ms": {
"type": [
"string",
"null"
],
"pattern": "^[0-9]+$",
"description": "Sum of complete observed HTTP delivery durations; null without any complete timing. Not asynchronous job duration."
},
"model": {
"type": "string"
}
}
}
},
"next_after": {
"type": [
"string",
"null"
]
}
}
}
},
"additionalProperties": false
}

Invalid interval, cursor boundary, limit or query.

Authentication required.

Platform administration required.

Provider does not exist or is deleted.

Storage unavailable or diagnostic query deadline exceeded; no partial totals.

Installation credential or explicit platform administrator required. Provider membership and customer roles do not grant access. Uses current explicit configuration ownership and persisted managed/media request routes; includes disabled configurations and does not infer unbound legacy/static traffic. This is current-configuration operational history, not historical financial attribution, qualified commercial supply, earnings or settlement. Counts each dispatched attempt once, including retry attempts. From is inclusive, to exclusive, in epoch milliseconds; maximum range 90 days. Token sums include only complete provider-reported aggregate token usage; unknown requests and non-token media remain separately counted. Failures count persisted safe failure observations, not an inference that every unsuccessful request has one. Timing counts refer to recorded HTTP delivery, not video job completion. Totals cover the whole range regardless of model page. after is an exclusive lexical model-alias boundary, not an identity lookup; pages are live statement snapshots. No customer identity, request/key IDs, endpoint, credentials, costs or prices are returned. No upstream call or mutation. Cache-Control no-store.

Supported scope: implemented