Skip to content

Set one person's cap on the AI allowance

PUT
/api/billing/ai-caps/people/{personId}
curl --request PUT \
--url https://forge.example.com/api/billing/ai-caps/people/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "capMicrodollars": 1 }'

Send capMicrodollars, a month, in place of the default for this person: 0 switches the assistant off for them on the instance’s account, and null takes their own cap away so the default applies again. A person who reaches their cap is told that their own share is used up and who can raise it; everyone else goes on. 404 for someone not in the organization. Recorded in the activity log. Answers the AI allowance by person. For administrators.

personId
required
string format: uuid
Media typeapplication/json
object
capMicrodollars
required
null | integer | string format: int64
/^-?(?:0|[1-9]\d*)$/

Example generated

{
"capMicrodollars": 1
}

OK

Media typeapplication/json
object
applies
required
boolean
poolMicrodollars
required
integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
poolSpentMicrodollars
required
integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
default
required
object
kind
required
string
microdollars
required
null | integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
percent
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
defaultCapMicrodollars
required
null | integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
version
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
people
required
Array<object>
object
personId
required
string format: uuid
name
required
string
active
required
boolean
spentMicrodollars
required
integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
ownCapMicrodollars
required
null | integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
capMicrodollars
required
null | integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
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
}
]
}

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"
}