---
title: "ai.attribution-quota@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/ai.attribution-quota"
updated: null
---

# ai.attribution-quota@1 · OpenVibe.Services

HTML: [ai.attribution-quota@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/ai.attribution-quota)

# AiAttributionQuota `ai.attribution-quota@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: ai
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/ai/attribution-quota.v1.json`](/docs/contracts/ai.attribution-quota.json)

ai.attribution-quota@1 (OpenVibe.AI; roadmap WS-O task 2): a cap on one attribution as its service reads it (GET or PUT /api/v1/attribution-quotas/{attribution}), with what the current window has used.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `attribution` | string | yes | <service>:<type>:<id>, the run's attribution as AI keys it (Live: live:user:<id>). | - `pattern ^[a-z][a-z0-9-]{1,31}:[a-z][a-z0-9_]{1,31}:[A-Za-z0-9_.-]{1,80}$` |
| `window` | enum | yes |  | - `one of "hour", "day"` |
| `workflow_prefix` | string \| null |  |  |  |
| `max_cost_usd` | number \| null |  |  | - `minimum 0` |
| `max_requests` | integer \| null |  |  | - `minimum 0` |
| `used` | object | yes |  | - `no other fields` |
| `used.requests` | integer | yes |  | - `minimum 0` |
| `used.cost_usd` | number | yes |  | - `minimum 0` |
| `window_resets_at` | string | yes |  | - `format date-time` |
| `updated_at` | string | yes |  | - `format date-time` |

## Examples

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

 Valid: viewers

~~~~
{
  "attribution": "live:user:42",
  "window": "day",
  "workflow_prefix": "live.viewers.",
  "max_cost_usd": 0.2,
  "max_requests": null,
  "used": {
    "requests": 12,
    "cost_usd": 0.034
  },
  "window_resets_at": "2026-09-29T00:00:00.000Z",
  "updated_at": "2026-09-28T00:30:00.000Z"
}
~~~~

Rejected: bad-attribution

~~~~
{
  "attribution": "42",
  "window": "day",
  "used": {
    "requests": 0,
    "cost_usd": 0
  },
  "window_resets_at": "2026-09-29T00:00:00.000Z",
  "updated_at": "2026-09-28T00:30:00.000Z"
}
~~~~

## Validate

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