ReportAiUsageOpenResult report.ai-usage-open-result@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- report
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/report/ai-usage-open-result.v1.json
report.ai-usage-open-result@1: the open AI meter (plan L40/L41). What the whole network spends on AI, in public: the tokens, the share of them that came from a provider cache, the share that the own keys of people paid, and the spend by week. No person, no site and no key is in it: the rows are summed before they are answered.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
calls | integer | yes | The AI calls behind these numbers. |
|
tokens | object | yes |
| |
tokens.input | integer | yes | The uncached input tokens. |
|
tokens.output | integer | yes |
| |
tokens.cache_read | integer | yes |
| |
tokens.cache_write | integer | yes |
| |
cache_share | number | yes | The share of the prompt tokens that came from a provider cache. |
|
cache_saved_usd | number | yes |
| |
own_key_share | number | yes | The share of the tokens that the own keys of people paid. |
|
own_key_calls | integer | yes |
| |
list_cost_usd | number | yes |
| |
charged_usd | number | yes |
| |
fee_usd | number | yes |
| |
spend_by_week | array of object | yes |
| |
spend_by_week[].week | string | yes | The Monday of the week. |
|
spend_by_week[].calls | integer | yes |
| |
spend_by_week[].list_cost_usd | number | yes |
| |
spend_by_week[].charged_usd | number | yes |
| |
spend_by_week[].cache_saved_usd | number | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: open
{
"calls": 120,
"tokens": {
"input": 1000,
"output": 200,
"cache_read": 800,
"cache_write": 150
},
"cache_share": 0.41,
"cache_saved_usd": 0.12,
"own_key_share": 0.25,
"own_key_calls": 30,
"list_cost_usd": 1.23,
"charged_usd": 0.9,
"fee_usd": 0.02,
"spend_by_week": [
{
"week": "2026-10-27",
"calls": 30,
"list_cost_usd": 0.4,
"charged_usd": 0.3,
"cache_saved_usd": 0.05
}
]
}Rejected: names-a-person
{
"calls": 120,
"tokens": {
"input": 1000,
"output": 200,
"cache_read": 800,
"cache_write": 150
},
"cache_share": 0.41,
"cache_saved_usd": 0.12,
"own_key_share": 0.25,
"own_key_calls": 30,
"list_cost_usd": 1.23,
"charged_usd": 0.9,
"fee_usd": 0.02,
"spend_by_week": [],
"subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('report.ai-usage-open-result@1', value); // { valid, errors: [{ path, message }] }