Docs

API reference · AI gateway

Create a budget in EUR for the organization, a key, or a named group of keys

POST/v1/orgs/{org}/ai/budgets
Permission
ai.budgets.manage
Audit log
ai.budget.create
Operation
ai.budgets.create

Parameters

NameInTypeRequiredNotes
orgpathstringyesfor example "org_01h455vb4pex5vsknk084sn02q"
Idempotency-KeyheaderstringnoOne key per intended mutation. A retry with the key replays the recorded response instead of executing again; the key with another request answers 422 idempotency_key_reused. For example "01h455vb4pex5vsknk084sn02q"
x-obhut-management-assignmentheaderstringnoSelect one staff assignment. Direct membership remains the default. Bound API tokens use their stored source and ignore this selector. For example "masg_01h455vb4pex5vsknk084sn02q"

Request body

FieldTypeRequiredNotes
scopeobject or object or objectyes
scope.kind"organization"yes
scope.keystringyesfor example "gwk_01h455vb4pex5vsknk084sn02q"
scope.namestringyes1 to 100 characters
limitNanoEurstringyesNano-euros (10^-9 EUR) as a decimal string. For example "50000000000"

Response 201

FieldTypeRequiredNotes
idstringyesfor example "bud_01h455vb4pex5vsknk084sn02q"
orgIdstringyesfor example "org_01h455vb4pex5vsknk084sn02q"
scopeobject or object or objectyes
scope.kind"organization"yes
scope.keystringyesfor example "gwk_01h455vb4pex5vsknk084sn02q"
scope.namestringyes1 to 100 characters
keyNamestring or nullyes
limitNanoEurstringyesNano-euros (10^-9 EUR) as a decimal string. For example "50000000000"
spentNanoEurstringyesNano-euros (10^-9 EUR) as a decimal string. For example "50000000000"
createdAtstring (date-time)yesUTC, ISO 8601.
updatedAtstring (date-time)yesUTC, ISO 8601.