ReportAiUsageResult report.ai-usage-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-result.v1.json

report.ai-usage-result@1: the AI meter in groups (plan L40/L41). GET /api/v1/ai/usage needs a service token with report.ai_usage.read; the rows are grouped by day, site, model, system or paid_by. A group that fewer than ten people share reads fewer than 10 instead of counting them.

Fields

FieldTypeRequiredDescriptionConstraints
groupenumyes
  • one of "day", "site", "model", "system", "paid_by"
usagearray of objectyes
  • items: no other fields
usage[].groupenumyes
  • one of "day", "site", "model", "system", "paid_by"
usage[].keystringyesThe name of the group: the day, the site, the model, the system or the payer.
  • maxLength 200
usage[].callsintegeryes
  • minimum 0
usage[].peopleone ofyes
usage[].inputintegeryes
  • minimum 0
usage[].outputintegeryes
  • minimum 0
usage[].reasoningintegeryes
  • minimum 0
usage[].cache_readintegeryes
  • minimum 0
usage[].cache_writeintegeryes
  • minimum 0
usage[].imagesinteger
  • minimum 0
usage[].audio_secondsnumber
  • minimum 0
usage[].video_secondsnumber
  • minimum 0
usage[].list_cost_usdnumberyes
  • minimum 0
usage[].charged_usdnumberyes
  • minimum 0
usage[].fee_usdnumberyes
  • minimum 0
usage[].cache_saved_usdnumberyes
  • minimum 0
totalsobjectyes
  • no other fields
totals.callsintegeryes
  • minimum 0
totals.inputintegeryes
  • minimum 0
totals.outputintegeryes
  • minimum 0
totals.reasoningintegeryes
  • minimum 0
totals.cache_readintegeryes
  • minimum 0
totals.cache_writeintegeryes
  • minimum 0
totals.imagesinteger
  • minimum 0
totals.audio_secondsnumber
  • minimum 0
totals.video_secondsnumber
  • minimum 0
totals.list_cost_usdnumberyes
  • minimum 0
totals.charged_usdnumberyes
  • minimum 0
totals.fee_usdnumberyes
  • minimum 0
totals.cache_saved_usdnumberyes
  • minimum 0

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: by-day
{
  "group": "day",
  "usage": [
    {
      "group": "day",
      "key": "2026-10-31",
      "calls": 12,
      "people": 14,
      "input": 100,
      "output": 50,
      "reasoning": 0,
      "cache_read": 800,
      "cache_write": 0,
      "list_cost_usd": 0.1,
      "charged_usd": 0.1,
      "fee_usd": 0,
      "cache_saved_usd": 0.02
    }
  ],
  "totals": {
    "calls": 12,
    "input": 100,
    "output": 50,
    "reasoning": 0,
    "cache_read": 800,
    "cache_write": 0,
    "list_cost_usd": 0.1,
    "charged_usd": 0.1,
    "fee_usd": 0,
    "cache_saved_usd": 0.02
  }
}
Valid: fewer-than-ten
{
  "group": "site",
  "usage": [
    {
      "group": "site",
      "key": "site:design",
      "calls": 3,
      "people": "fewer than 10",
      "input": 10,
      "output": 5,
      "reasoning": 0,
      "cache_read": 0,
      "cache_write": 0,
      "list_cost_usd": 0.01,
      "charged_usd": 0.01,
      "fee_usd": 0,
      "cache_saved_usd": 0
    }
  ],
  "totals": {
    "calls": 3,
    "input": 10,
    "output": 5,
    "reasoning": 0,
    "cache_read": 0,
    "cache_write": 0,
    "list_cost_usd": 0.01,
    "charged_usd": 0.01,
    "fee_usd": 0,
    "cache_saved_usd": 0
  }
}
Rejected: counts-few-people
{
  "group": "site",
  "usage": [
    {
      "group": "site",
      "key": "site:design",
      "calls": 3,
      "people": 3,
      "input": 10,
      "output": 5,
      "reasoning": 0,
      "cache_read": 0,
      "cache_write": 0,
      "list_cost_usd": 0.01,
      "charged_usd": 0.01,
      "fee_usd": 0,
      "cache_saved_usd": 0
    }
  ],
  "totals": {
    "calls": 3,
    "input": 10,
    "output": 5,
    "reasoning": 0,
    "cache_read": 0,
    "cache_write": 0,
    "list_cost_usd": 0.01,
    "charged_usd": 0.01,
    "fee_usd": 0,
    "cache_saved_usd": 0
  }
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('report.ai-usage-result@1', value);   // { valid, errors: [{ path, message }] }