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

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

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

# AiAttributionQuotaPut `ai.attribution-quota-put@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-put.v1.json`](/docs/contracts/ai.attribution-quota-put.json)

ai.attribution-quota-put@1 (OpenVibe.AI; roadmap WS-O task 2): a cap on runs attributed to one of the caller's own entities, PUT /api/v1/attribution-quotas/{attribution} with capability ai.quota.attribution.manage; the attribution's service must be the caller (Live caps live:user:<id>, a streamer's AI viewers). Over the cap a run is refused 429 quota.exceeded before any provider is called. Cost counts what runs have cost so far in the window, so the run that crosses the cap finishes and the next is refused.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `window` | enum | yes |  | - `one of "hour", "day"` |
| `max_cost_usd` | number |  |  | - `minimum 0`<br>- `maximum 10000` |
| `max_requests` | integer |  |  | - `minimum 0`<br>- `maximum 1000000` |
| `workflow_prefix` | string |  | Only runs of workflows whose key starts with this (live.viewers.). | - `pattern ^[a-z][a-z0-9_.-]{1,79}$` |

## Examples

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

 Valid: viewers-day

~~~~
{
  "window": "day",
  "max_cost_usd": 0.2,
  "workflow_prefix": "live.viewers."
}
~~~~

Rejected: minute

~~~~
{
  "window": "minute",
  "max_requests": 5
}
~~~~

Rejected: no-limit

~~~~
{
  "window": "day"
}
~~~~

## Validate

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