Skip to main content
API reference sections

Schema

UsageGroup

One row in the all-usage report. Every dimension is content-free and can survive history deletion without retaining a chat or message identity.

Type object

Shape

FieldTypeDescription
utc_dayrequiredstring
surfacerequiredAiSurface
providerrequiredAiProviderId

Extensible provider token such as openai, ollama, or koru.

modelrequiredstring
reasoningrequiredReasoningChoice

A provider's reasoning setting - ai.db's nine-token CHECK.

statusrequiredAttemptStatus
prompt_template_versionrequiredstring
totalsrequiredUsageTotals

Content-free aggregate measurements for one usage scope or reporting row.

Provider token fields remain optional so an unavailable measurement cannot be mistaken for a reported zero. Context counts and bytes are measured by Koru itself and therefore have exact zero values.

Example
{
  "utc_day": "string",
  "surface": "standalone",
  "provider": "string",
  "model": "string",
  "reasoning": "default",
  "status": "pending",
  "prompt_template_version": "string",
  "totals": {
    "attempts": 0,
    "attempts_with_reported_usage": 0,
    "request_payload_bytes": 0,
    "web_search_calls": 0,
    "context_payload_bytes": 0,
    "message_count": 0,
    "context_document_count": 0,
    "context_message_block_count": 0,
    "prompt_tokens": 0,
    "cached_prompt_tokens": 0,
    "completion_tokens": 0,
    "reasoning_tokens": 0,
    "total_tokens": 0,
    "average_context_assembly_ms": 0,
    "average_provider_start_ms": 0,
    "average_time_to_first_token_ms": 0,
    "average_generation_ms": 0,
    "average_total_ms": 0,
    "good_feedback": 0,
    "bad_feedback": 0
  }
}

The contract has no example values, so example bodies are generated from each schema: every field is shown with a placeholder of its type.

Generated from contract version 1. Last updated .

Privacy choices

Choose which optional tools Koru may use on this site. Your choice is saved in a cookie in this browser for 12 months. Privacy policy

Privacy choices

Keep you signed in, protect forms and remember your language and this choice.

Always on

PostHog and Google Analytics 4 measure page views and actions such as downloads, using cookies or local storage.

PostHog records how pages are used, with form inputs masked and private pages excluded. Needs Analytics.

Ahrefs Web Analytics measures visits and where they come from, and Google Ads measures whether our ads led to a visit or download.