ExchangeGeneration exchange.generation@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- exchange
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Decision
- ADR-025
- Schema
https://openvibe.network/contracts/exchange/generation.v1.json
Owner-scoped request accounting. Cost is USD and latency is milliseconds; prompts and outputs are excluded.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes |
| |
model | string | null | yes | ||
provider | string | null | yes | ||
cost | number | yes |
| |
total_cost | number | yes |
| |
latency | number | yes |
| |
tokens_prompt | integer | yes |
| |
tokens_completion | integer | yes |
| |
created_at | string | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: example
{
"id": "run_fixture",
"model": "maker/model",
"provider": "maker",
"cost": 0.001,
"total_cost": 0.001,
"latency": 10,
"tokens_prompt": 12,
"tokens_completion": 3,
"created_at": "2026-11-09T00:00:00Z"
}Rejected: example
{
"id": "run_fixture"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('exchange.generation@1', value); // { valid, errors: [{ path, message }] }