Docs

Type a word or a question. Esc closes the search.

Sign in Start free

Update AI quota

Sets the Company's monthly AI call limit and budget, or removes either limit when its value is null.

PUT https://app.upfour.io/v1/organization/ai-quota
PUT https://app.upfour.io/v1/organization/ai-quota

A real request. Sending it changes data in your up4 account.

Authorization
AuthorizationA pls_ key. It stays in this browser tab. Needs organization.write.
Body
More fields2

Sent directly from your browser to https://app.upfour.io/v1. Mutating calls get an automatic Idempotency-Key when the field is empty.

Request
Responsenot sent yet
Fill in a key and press Send request (⌘↵).
The answer appears here.
scope organization.write stable returns 200

Body

application/json required 2 fields

All other fields2 fields
monthly_call_capinteger · nullable

Monthly AI call limit, at most platform_call_cap. null removes the Company's own limit so the default applies.

monthly_cap_centsinteger · nullable

Monthly AI budget in cents, at most platform_cap_cents of GET /organization/ai-usage. null removes the Company's own budget so the default applies.

Returns

A successful request returns 200 with application/json.

Response fields 1 top-level fields
FieldTypeDescription
data AIUsageSummary
AIUsageSummary · 8 fields
FieldTypeDescription
call_cap integer The monthly call limit in force: the Company's own value, never above platform_call_cap.
calls integer
cap_cents integer The monthly budget in force: the Company's own value, never above platform_cap_cents.
period_resets_at string (date-time)
period_started_at string (date-time)
platform_call_cap integer
platform_cap_cents integer
used_cents integer This month's AI usage in cents, at the price the Company pays.

Errors

Only the errors this operation can return. Every error uses the same envelope.

Status Code Meaning
402 ai_billing_blocked AI features are switched off because the Company has no active credit. When: An AI summary or postmortem request while the Company has no active credit. Fix: Top up the credit, then retry.
422 ai_budget_above_platform_limit The monthly AI budget exceeds the platform limit (error.details.limit). When: Saving an AI budget larger than the platform allows; details.limit gives the maximum. Fix: Set a budget at or below details.limit. ai_budget_above_platform_limit or ai_call_cap_above_platform_limit: the monthly AI budget or call cap is above the platform limit (error.details.limit).
422 ai_call_cap_above_platform_limit The monthly AI call cap exceeds the platform limit (error.details.limit). When: Saving an AI call cap larger than the platform allows; details.limit gives the maximum. Fix: Set a cap at or below details.limit.
400 bad_request The request is malformed or fails validation.
409 conflict The request conflicts with the current state.
404 not_found The requested resource does not exist or is outside the caller's scope.
403 permission_denied The credentials do not permit this action.
503 service_unavailable The service or a required dependency is temporarily unavailable.

Every call can also return unauthorized (401), rate_limit_exceeded (429) or internal_error (500 / 502). See Responses and errors.