Set the cap each person has on the AI allowance
PUT
/api/billing/ai-caps
const url = 'https://forge.example.com/api/billing/ai-caps';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"kind":"example","microdollars":1,"percent":1,"version":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://forge.example.com/api/billing/ai-caps \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "kind": "example", "microdollars": 1, "percent": 1, "version": 1 }'Send kind: none to share the pool freely, dollars with microdollars a month, or share with percent (0 to 100) of the month’s allowance, rounded down; and version as GET /api/billing/ai-caps answered it (0 before any was set). 0 dollars or 0 percent switches the assistant off on the instance’s account for everyone without a cap of their own. A cap counts only calls on the instance’s own account. 409 with currentVersion when someone changed the caps first, or when the organization has no plan with an AI allowance. Recorded in the activity log. Answers the AI allowance by person. For administrators.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
kind
required
string
microdollars
required
null | integer | string format: int64
percent
required
null | integer | string format: int32
version
required
null | integer | string format: int32
Example generated
{ "kind": "example", "microdollars": 1, "percent": 1, "version": 1}Responses
Section titled “Responses”OK
Media typeapplication/json
object
applies
required
boolean
poolMicrodollars
required
integer | string format: int64
poolSpentMicrodollars
required
integer | string format: int64
default
required
object
kind
required
string
microdollars
required
null | integer | string format: int64
percent
required
null | integer | string format: int32
defaultCapMicrodollars
required
null | integer | string format: int64
version
required
integer | string format: int32
people
required
Array<object>
object
personId
required
string format: uuid
name
required
string
active
required
boolean
spentMicrodollars
required
integer | string format: int64
ownCapMicrodollars
required
null | integer | string format: int64
capMicrodollars
required
null | integer | string format: int64
stopped
required
boolean
Example generated
{ "applies": true, "poolMicrodollars": 1, "poolSpentMicrodollars": 1, "default": { "kind": "example", "microdollars": 1, "percent": 1 }, "defaultCapMicrodollars": 1, "version": 1, "people": [ { "personId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "active": true, "spentMicrodollars": 1, "ownCapMicrodollars": 1, "capMicrodollars": 1, "stopped": true } ]}default
Section titled “default”A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.
Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}