ReportAiUsageMeResult report.ai-usage-me-result@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

An older major, still in the catalog. The current one is report.ai-usage-me-result@2.
Version
1.0.0
Owner
report
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/report/ai-usage-me-result.v1.json

report.ai-usage-me-result@1: the AI usage of one person (plan L40/L41). GET /api/v1/me/ai/usage answers for the person themselves and nobody else: their rows, grouped by day, site, model, system or paid_by. The route answers 501 until Report has sign-in: the shape is fixed here first, so the route does not have to change when it opens.

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[].keystringyes
  • maxLength 200
usage[].callsintegeryes
  • minimum 0
usage[].inputintegeryes
  • minimum 0
usage[].outputintegeryes
  • minimum 0
usage[].reasoningintegeryes
  • minimum 0
usage[].cache_readintegeryes
  • minimum 0
usage[].cache_writeintegeryes
  • 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

Examples

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

The fixtures that ship with the package are the current major's.

Validate

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