Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "model-hub/usage-summary.schema.json",
"title": "Model Hub usage summary",
"description": "Metered token usage over a trailing local-day or recent-hour window, aggregated from the turns the gateway proxied. A report only: no consumer of this document may feed it back into resolution, admission, or cooldown.",
"type": "object",
"required": [
"window_days",
"from_day",
"to_day",
"totals",
"sources",
"services",
"days"
],
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"window_key"
]
},
{
"required": [
"granularity"
]
},
{
"required": [
"from_at"
]
},
{
"required": [
"to_at"
]
},
{
"required": [
"buckets"
]
}
]
}
},
{
"required": [
"window_key",
"granularity",
"from_at",
"to_at",
"buckets"
]
}
],
"additionalProperties": false,
"properties": {
"window_days": {
"description": "Daily window after clamping to the retained range, or the number of local dates touched by an hourly report, including its current report date.",
"type": "integer",
"minimum": 1,
"maximum": 62
},
"from_day": {
"$ref": "#/definitions/LocalDay",
"description": "First local day of the window, present even when it carries no turn."
},
"to_day": {
"$ref": "#/definitions/LocalDay",
"description": "Last local day of the window, which is the host's today."
},
"totals": {
"$ref": "#/definitions/Counters"
},
"sources": {
"description": "One entry per Source with at least one metered turn in the window, busiest first.",
"type": "array",
"items": {
"$ref": "#/definitions/SourceUsage"
}
},
"services": {
"description": "One entry per (Source, search service) with at least one sent request in the window, busiest first. Service usage never appears in sources[].",
"type": "array",
"items": {
"$ref": "#/definitions/ServiceUsage"
}
},
"days": {
"description": "One entry per local day carrying a metered turn, oldest first. Hourly reports group the published bucket rows by bucket start date; daily reports retain local-calendar accounting.",
"type": "array",
"items": {
"$ref": "#/definitions/DayUsage"
}
},
"window_key": {
"description": "Modern report selector served by the API.",
"enum": [
"24h",
"7d",
"30d",
"60d"
]
},
"granularity": {
"description": "Temporal granularity of the dense bucket matrix.",
"enum": [
"hour",
"day"
]
},
"from_at": {
"description": "RFC3339 start of the first dense bucket, with the server-local UTC offset.",
"type": "string",
"format": "date-time"
},
"to_at": {
"description": "RFC3339 report time, with the server-local UTC offset.",
"type": "string",
"format": "date-time"
},
"buckets": {
"description": "Dense chronological buckets: 24 for 24h, or one per local calendar day for the daily windows.",
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/UsageBucket"
}
},
"pricing": {
"$ref": "#/definitions/Pricing"
}
},
"definitions": {
"LocalDay": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"Count": {
"description": "One metered count: the exact sum of the per-call reports inside the window, each already bounded where it entered the wire. Never clamped to keep it small — a truncated total is indistinguishable from a real one, and clamping a subset and its superset together forces a ratio such as a cached-input share to exactly 100%. The maximum is derived from the producer rather than imposed on the user, and caps nobody's spending: a count is a sum over at most 400 rows (USAGE_MAX_ROWS), each carrying counters of at most 2^53 - 1 (USAGE_COUNTER_CEILING). Both limits are applied when the store is read as well as when it is written, so the bound holds for a corrupt or hand-edited store too and not only for one this producer wrote. A consumer reading this document into IEEE-754 doubles holds every value up to 2^53 - 1 exactly and every larger one as a finite double, rounded in its last places; a window spans at most 62 days of real calls, so only a corrupt or hand-edited store can publish a count in that rounding range.",
"type": "integer",
"minimum": 0,
"maximum": 3602879701896396400
},
"Counters": {
"type": "object",
"required": [
"requests",
"token_reports",
"input_tokens",
"cached_input_tokens",
"output_tokens"
],
"additionalProperties": false,
"properties": {
"requests": {
"$ref": "#/definitions/Count",
"description": "Self-measured upstream calls that reached the model. One turn contributes more than one when it failed over. Always available."
},
"token_reports": {
"$ref": "#/definitions/Count",
"description": "Metered calls whose upstream response carried a token report. Never greater than requests; a shortfall means missing reports, not zero usage."
},
"input_tokens": {
"$ref": "#/definitions/Count",
"description": "Vendor-reported input tokens composed per protocol, including tokens served from cache."
},
"cached_input_tokens": {
"$ref": "#/definitions/Count",
"description": "Subset of input_tokens served from cache."
},
"output_tokens": {
"$ref": "#/definitions/Count"
},
"cache_write_input_tokens": {
"$ref": "#/definitions/Count",
"description": "Subset of input_tokens written to the prompt cache (Anthropic `cache_creation_input_tokens`), disjoint from cached_input_tokens. Zero for protocols that report no cache writes. Absent from documents produced before cache writes were metered; read absence as zero."
},
"cache_write_1h_input_tokens": {
"$ref": "#/definitions/Count",
"description": "Subset of cache_write_input_tokens written with the one-hour cache lifetime (Anthropic `cache_creation.ephemeral_1h_input_tokens`); the rest used the five-minute lifetime."
},
"cache_write_30m_input_tokens": {
"$ref": "#/definitions/Count",
"description": "OpenAI Responses cache-write tokens reported for the 30-minute lifetime. This counter is distinct from Anthropic's one-hour counter."
},
"cache_write_12h_input_tokens": {
"$ref": "#/definitions/Count",
"description": "OpenAI Responses cache-write tokens reported for the 12-hour lifetime. The 30m and 12h counters are disjoint and together must not exceed cache_write_input_tokens."
},
"cache_write_uncaptured_reports": {
"$ref": "#/definitions/Count",
"description": "Subset of token_reports metered before cache writes were captured. Their cache writes, if any, are inside input_tokens but not in cache_write_input_tokens."
},
"cache_write_ttl_uncaptured_reports": {
"$ref": "#/definitions/Count",
"description": "Token reports for OpenAI Responses rows whose total cache-write count or 30m/12h lifetime breakdown was missing or invalid. These reports remain a lower bound and no TTL is inferred from the request default."
},
"api_cost_usd": {
"description": "What this usage would cost at the vendor's list API price, in `pricing.currency`, at the current price table — never the price in force when the call ran. A valuation for comparison, never an amount charged. Present exactly when `pricing` is. Usage whose model has no price is left out and counted in excluded_tokens, never priced as zero.",
"type": "number",
"minimum": 0
},
"excluded_tokens": {
"$ref": "#/definitions/Count",
"description": "input_tokens + output_tokens of the usage whose model has no known price, which api_cost_usd therefore leaves out. Present exactly when `pricing` is."
},
"api_cost_lower_bound": {
"description": "True when api_cost_usd is only a floor: some tokens are excluded, some requests have no token report, or some priced usage was metered before cache writes were captured on a model that lists a cache-write price above input, or the read could not see all usage (a degraded ledger read, or an incomplete hourly bucket). Present exactly when `pricing` is.",
"type": "boolean"
},
"service_reported_usd": {
"description": "The sum of costs reported by search-service vendors, kept separate from the current-catalog list valuation. Present exactly when `pricing` is.",
"type": "number",
"minimum": 0
},
"excluded_service_requests": {
"$ref": "#/definitions/Count",
"description": "Billable search requests whose service has no current catalog price, so they are excluded from api_cost_usd. Present exactly when `pricing` is."
},
"fast_requests": {
"$ref": "#/definitions/Count",
"description": "Requests among `requests` whose response said they ran at the vendor's fast tier (Anthropic `usage.speed: \"fast\"`, OpenAI `service_tier: \"priority\"`; docs/plans/fast-mode.md). Their tokens are valued at the model's fast-tier rates, or at its standard rates as a lower bound where the price table lists none. Present only when at least one such request is in the aggregate."
}
}
},
"UsageBucketRow": {
"oneOf": [
{
"$ref": "#/definitions/UsageModelBucketRow"
},
{
"$ref": "#/definitions/UsageServiceBucketRow"
}
]
},
"UsageModelBucketRow": {
"type": "object",
"required": [
"source_id",
"model_id",
"requests",
"token_reports",
"input_tokens",
"cached_input_tokens",
"output_tokens"
],
"additionalProperties": false,
"properties": {
"source_id": {
"type": "string",
"minLength": 1
},
"model_id": {
"type": "string",
"minLength": 1
},
"requests": {
"$ref": "#/definitions/Count"
},
"token_reports": {
"$ref": "#/definitions/Count"
},
"input_tokens": {
"$ref": "#/definitions/Count"
},
"cached_input_tokens": {
"$ref": "#/definitions/Count"
},
"output_tokens": {
"$ref": "#/definitions/Count"
},
"cache_write_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_input_tokens"
},
"cache_write_1h_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_1h_input_tokens"
},
"cache_write_30m_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_30m_input_tokens"
},
"cache_write_12h_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_12h_input_tokens"
},
"cache_write_uncaptured_reports": {
"$ref": "#/definitions/Counters/properties/cache_write_uncaptured_reports"
},
"cache_write_ttl_uncaptured_reports": {
"$ref": "#/definitions/Counters/properties/cache_write_ttl_uncaptured_reports"
},
"api_cost_usd": {
"$ref": "#/definitions/Counters/properties/api_cost_usd"
},
"excluded_tokens": {
"$ref": "#/definitions/Counters/properties/excluded_tokens"
},
"api_cost_lower_bound": {
"$ref": "#/definitions/Counters/properties/api_cost_lower_bound"
},
"fast_requests": {
"$ref": "#/definitions/Counters/properties/fast_requests"
}
}
},
"UsageServiceBucketRow": {
"type": "object",
"required": [
"kind",
"source_id",
"service_id",
"requests",
"billable_requests",
"uncertain_requests",
"reported_requests"
],
"additionalProperties": false,
"properties": {
"kind": {
"const": "service"
},
"source_id": {
"type": "string",
"minLength": 1
},
"service_id": {
"type": "string",
"minLength": 1
},
"tool": {"enum": ["web_search", "web_fetch"], "description": "Absent historical rows mean web_search. Attribution is keyed by Source, service and tool; cooldown remains keyed by Source and service."},
"requests": {
"$ref": "#/definitions/Count"
},
"billable_requests": {
"$ref": "#/definitions/Count"
},
"uncertain_requests": {
"$ref": "#/definitions/Count"
},
"reported_requests": {
"$ref": "#/definitions/Count"
},
"reported_usd": {
"$ref": "#/definitions/Counters/properties/service_reported_usd"
},
"api_cost_usd": {
"$ref": "#/definitions/Counters/properties/api_cost_usd"
},
"api_cost_lower_bound": {
"$ref": "#/definitions/Counters/properties/api_cost_lower_bound"
}
}
},
"UsageBucket": {
"type": "object",
"required": [
"key",
"start_at",
"end_at",
"history_complete",
"rows"
],
"additionalProperties": false,
"properties": {
"key": {
"description": "Server-local rendering of the canonical UTC hour boundary, with an explicit offset; fractional-offset zones may show :30 or :45.",
"type": "string",
"minLength": 1
},
"start_at": {
"description": "Inclusive server-local rendering of the canonical UTC hour boundary.",
"type": "string",
"format": "date-time"
},
"end_at": {
"description": "Exclusive server-local rendering of the next canonical UTC hour boundary; the final bucket ends at report time.",
"type": "string",
"format": "date-time"
},
"history_complete": {
"type": "boolean"
},
"rows": {
"type": "array",
"items": {
"$ref": "#/definitions/UsageBucketRow"
}
}
}
},
"SourceUsage": {
"type": "object",
"required": [
"source_id",
"label",
"requests",
"token_reports",
"input_tokens",
"cached_input_tokens",
"output_tokens",
"last_metered_at",
"models"
],
"additionalProperties": false,
"properties": {
"source_id": {
"type": "string",
"minLength": 1
},
"label": {
"description": "Joined from current Source config; null exactly when config no longer holds the Source (a live Source always has a display name). The UI folds every null-label Source into one Removed providers identity and never displays source_id.",
"type": [
"string",
"null"
]
},
"requests": {
"$ref": "#/definitions/Count"
},
"token_reports": {
"$ref": "#/definitions/Count"
},
"input_tokens": {
"$ref": "#/definitions/Count"
},
"cached_input_tokens": {
"$ref": "#/definitions/Count"
},
"output_tokens": {
"$ref": "#/definitions/Count"
},
"last_metered_at": {
"description": "When this Source last had a call metered, served or billed-and-failed.",
"type": [
"string",
"null"
],
"format": "date-time"
},
"models": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/ModelUsage"
}
},
"cache_write_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_input_tokens"
},
"cache_write_1h_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_1h_input_tokens"
},
"cache_write_30m_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_30m_input_tokens"
},
"cache_write_12h_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_12h_input_tokens"
},
"cache_write_uncaptured_reports": {
"$ref": "#/definitions/Counters/properties/cache_write_uncaptured_reports"
},
"cache_write_ttl_uncaptured_reports": {
"$ref": "#/definitions/Counters/properties/cache_write_ttl_uncaptured_reports"
},
"api_cost_usd": {
"$ref": "#/definitions/Counters/properties/api_cost_usd"
},
"excluded_tokens": {
"$ref": "#/definitions/Counters/properties/excluded_tokens"
},
"api_cost_lower_bound": {
"$ref": "#/definitions/Counters/properties/api_cost_lower_bound"
},
"fast_requests": {
"$ref": "#/definitions/Counters/properties/fast_requests"
}
}
},
"ModelUsage": {
"type": "object",
"required": [
"model_id",
"label",
"requests",
"token_reports",
"input_tokens",
"cached_input_tokens",
"output_tokens"
],
"additionalProperties": false,
"properties": {
"model_id": {
"description": "Ledger key: the metered model identifier verbatim up to 200 characters, otherwise a head plus a digest. Display label when present; an unlisted model under a live Source displays this key only while it is verbatim.",
"type": "string",
"minLength": 1
},
"label": {
"description": "The model identity this row was metered under, joined from current Source config; null once the Source no longer lists the model.",
"type": [
"string",
"null"
]
},
"requests": {
"$ref": "#/definitions/Count"
},
"token_reports": {
"$ref": "#/definitions/Count"
},
"input_tokens": {
"$ref": "#/definitions/Count"
},
"cached_input_tokens": {
"$ref": "#/definitions/Count"
},
"output_tokens": {
"$ref": "#/definitions/Count"
},
"cache_write_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_input_tokens"
},
"cache_write_1h_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_1h_input_tokens"
},
"cache_write_30m_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_30m_input_tokens"
},
"cache_write_12h_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_12h_input_tokens"
},
"cache_write_uncaptured_reports": {
"$ref": "#/definitions/Counters/properties/cache_write_uncaptured_reports"
},
"cache_write_ttl_uncaptured_reports": {
"$ref": "#/definitions/Counters/properties/cache_write_ttl_uncaptured_reports"
},
"api_cost_usd": {
"$ref": "#/definitions/Counters/properties/api_cost_usd"
},
"excluded_tokens": {
"$ref": "#/definitions/Counters/properties/excluded_tokens"
},
"api_cost_lower_bound": {
"$ref": "#/definitions/Counters/properties/api_cost_lower_bound"
},
"priced": {
"description": "Whether a price was found for this model. Present exactly when `pricing` is; false means the UI shows no price for it and its tokens are in excluded_tokens.",
"type": "boolean"
},
"fast_requests": {
"$ref": "#/definitions/Counters/properties/fast_requests"
}
}
},
"ServiceUsage": {
"type": "object",
"required": [
"source_id",
"service_id",
"label",
"service_label",
"requests",
"billable_requests",
"uncertain_requests",
"reported_requests",
"last_metered_at"
],
"additionalProperties": false,
"properties": {
"source_id": {
"type": "string",
"minLength": 1
},
"service_id": {
"type": "string",
"minLength": 1
},
"tool": {"enum": ["web_search", "web_fetch"], "description": "Absent historical rows mean web_search. Attribution is keyed by Source, service and tool; cooldown remains keyed by Source and service."},
"label": {
"description": "Current Source label, null once the Source is removed.",
"type": [
"string",
"null"
]
},
"service_label": {
"description": "Current catalog label, null when this service is no longer in the catalog.",
"type": [
"string",
"null"
]
},
"requests": {
"$ref": "#/definitions/Count"
},
"billable_requests": {
"$ref": "#/definitions/Count"
},
"uncertain_requests": {
"$ref": "#/definitions/Count"
},
"reported_requests": {
"$ref": "#/definitions/Count"
},
"last_metered_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"priced": {
"type": "boolean"
},
"reported_usd": {
"$ref": "#/definitions/Counters/properties/service_reported_usd"
},
"api_cost_usd": {
"$ref": "#/definitions/Counters/properties/api_cost_usd"
},
"api_cost_lower_bound": {
"$ref": "#/definitions/Counters/properties/api_cost_lower_bound"
}
}
},
"DayUsage": {
"type": "object",
"required": [
"day",
"requests",
"token_reports",
"input_tokens",
"cached_input_tokens",
"output_tokens"
],
"additionalProperties": false,
"properties": {
"day": {
"$ref": "#/definitions/LocalDay"
},
"requests": {
"$ref": "#/definitions/Count"
},
"token_reports": {
"$ref": "#/definitions/Count"
},
"input_tokens": {
"$ref": "#/definitions/Count"
},
"cached_input_tokens": {
"$ref": "#/definitions/Count"
},
"output_tokens": {
"$ref": "#/definitions/Count"
},
"cache_write_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_input_tokens"
},
"cache_write_1h_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_1h_input_tokens"
},
"cache_write_30m_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_30m_input_tokens"
},
"cache_write_12h_input_tokens": {
"$ref": "#/definitions/Counters/properties/cache_write_12h_input_tokens"
},
"cache_write_uncaptured_reports": {
"$ref": "#/definitions/Counters/properties/cache_write_uncaptured_reports"
},
"cache_write_ttl_uncaptured_reports": {
"$ref": "#/definitions/Counters/properties/cache_write_ttl_uncaptured_reports"
},
"api_cost_usd": {
"$ref": "#/definitions/Counters/properties/api_cost_usd"
},
"excluded_tokens": {
"$ref": "#/definitions/Counters/properties/excluded_tokens"
},
"api_cost_lower_bound": {
"$ref": "#/definitions/Counters/properties/api_cost_lower_bound"
},
"service_reported_usd": {
"$ref": "#/definitions/Counters/properties/service_reported_usd"
},
"excluded_service_requests": {
"$ref": "#/definitions/Count"
},
"fast_requests": {
"$ref": "#/definitions/Counters/properties/fast_requests"
}
}
},
"Pricing": {
"description": "Current model price table and optional service-catalog verification date. Absent when no model table can be read; every cost field is then absent too.",
"type": "object",
"required": [
"currency",
"price_table_date"
],
"additionalProperties": false,
"properties": {
"currency": {
"const": "USD"
},
"price_table_date": {
"description": "Local date the models.dev price table was last fetched; null when none has been fetched and only local overrides priced anything.",
"oneOf": [
{
"$ref": "#/definitions/LocalDay"
},
{
"type": "null"
}
]
},
"pending": {
"description": "Present (true) when no models.dev price table has been read yet and a first fetch is running that is expected to land; the cost fields then cover only what local overrides price. A client may re-read shortly and say prices are being fetched rather than that there are none. Absent means no fetch is awaited: a table is in hand, or the last fetch failed.",
"const": true
},
"service_price_date": {
"description": "Oldest catalog price verification date among the search services that were priced in this report.",
"$ref": "#/definitions/LocalDay"
}
}
}
},
"examples": [
{
"window_days": 30,
"from_day": "2026-07-20",
"to_day": "2026-08-18",
"totals": {
"requests": 12,
"token_reports": 9,
"input_tokens": 148230,
"cached_input_tokens": 96010,
"output_tokens": 4120,
"cache_write_input_tokens": 20100,
"cache_write_1h_input_tokens": 0,
"cache_write_30m_input_tokens": 0,
"cache_write_12h_input_tokens": 0,
"cache_write_uncaptured_reports": 0,
"cache_write_ttl_uncaptured_reports": 0,
"api_cost_usd": 0.43723,
"excluded_tokens": 0,
"api_cost_lower_bound": false
},
"services": [],
"sources": [
{
"source_id": "src_conform001",
"label": "Contract source",
"requests": 12,
"token_reports": 9,
"input_tokens": 148230,
"cached_input_tokens": 96010,
"output_tokens": 4120,
"last_metered_at": "2026-08-18T03:14:00+00:00",
"models": [
{
"model_id": "claude-opus-4-6",
"label": "claude-opus-4-6",
"requests": 12,
"token_reports": 9,
"input_tokens": 148230,
"cached_input_tokens": 96010,
"output_tokens": 4120,
"cache_write_input_tokens": 20100,
"cache_write_1h_input_tokens": 0,
"cache_write_30m_input_tokens": 0,
"cache_write_12h_input_tokens": 0,
"cache_write_uncaptured_reports": 0,
"cache_write_ttl_uncaptured_reports": 0,
"api_cost_usd": 0.43723,
"excluded_tokens": 0,
"api_cost_lower_bound": false,
"priced": true
}
],
"cache_write_input_tokens": 20100,
"cache_write_1h_input_tokens": 0,
"cache_write_30m_input_tokens": 0,
"cache_write_12h_input_tokens": 0,
"cache_write_uncaptured_reports": 0,
"cache_write_ttl_uncaptured_reports": 0,
"api_cost_usd": 0.43723,
"excluded_tokens": 0,
"api_cost_lower_bound": false
}
],
"days": [
{
"day": "2026-08-18",
"requests": 12,
"token_reports": 9,
"input_tokens": 148230,
"cached_input_tokens": 96010,
"output_tokens": 4120,
"cache_write_input_tokens": 20100,
"cache_write_1h_input_tokens": 0,
"cache_write_30m_input_tokens": 0,
"cache_write_12h_input_tokens": 0,
"cache_write_uncaptured_reports": 0,
"cache_write_ttl_uncaptured_reports": 0,
"api_cost_usd": 0.43723,
"excluded_tokens": 0,
"api_cost_lower_bound": false
}
],
"pricing": {
"currency": "USD",
"price_table_date": "2026-08-18"
}
}
]
}