provod.ai / docs
API

Get analytics metadata

Discover supported metrics, dimensions, filters and analytics query limits.

Last updated on

GET /v1/analytics/meta

Discover the supported metrics, dimensions, filter operators and query limits.

Authentication

Authorization: Bearer <MANAGEMENT_API_KEY>: a management key bound to the workspace.

The credential determines the workspace. X-Org-Id is unsupported.

Metrics and dimensions

FieldTypeDescription
total_usagenumberActual usage and linked guardrail charges; also returns total_usage_exact.
request_count, error_countnumberTerminal requests and errors. Paid errors can contribute spending.
total_prompt_tokens, total_completion_tokensnumberRecorded input and output tokens.
total_reasoning_tokens, total_cached_tokensnumberRecorded reasoning and cached tokens.
avg_latencynumberAverage request duration in seconds.

Dimensions: model, external_user, generation_id, api_key_hash, api_key_id, user_id, user, workspace_id, workspace.

api_key_id returns the same hash as api_key_hash. user and workspace alias user_id and workspace_id. external_user comes from the user field in Chat Completions or Responses: it identifies your application user, not a workspace member. Historical requests may contain null.

Parameters

No request body or parameters are required.

Response · 200

FieldTypeDescription
data.currencystringWorkspace billing currency.
data.metricsobject[]name, display_label (strings), display_format (currency or number), is_rate (boolean, currently false).
data.dimensions, data.granularitiesobject[]name and display_label strings. Granularities: hour, day, week, month.
data.operatorsobject[]name: eq, neq, in or not_in; value_type: scalar for eq/neq, array for in/not_in.
data.limitsobjectmax_days: 93, max_rows: 10000, max_dimensions: 2, max_filters: 20.

Response example

Identifiers and amounts in these examples are illustrative.

Request example

Load the key into a server environment variable. TypeScript uses Node.js fetch; Python uses only the standard library.

const response = await fetch("https://api.provod.ai/v1/analytics/meta", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MANAGEMENT_API_KEY}`,
  },
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
console.log(await response.json());

Errors

HTTPErrorCause
401UnauthorizedMissing, invalid, disabled, revoked or expired key. The X-Org-Id header is also rejected.
403ForbiddenWrong key kind or insufficient workspace access.

Authentication error example:

{
  "error": {
    "code": "invalid_api_key",
    "message": "Invalid API key",
    "metadata": {}
  }
}

Next steps

On this page