AI mode and prompt budgets
AI mode is an owner-controlled, app-scoped analytics surface. It is optional: disabling it does not change collection, dashboards, exports, or the public SDK.
The current phase implements authentication, authorization, quota accounting, and transport. It
does not call a model or return generated analysis yet. Prompt requests return 501 Not Implemented
after authentication and app authorization. They do not consume allowance or create billing usage.
Budget ownership
Section titled “Budget ownership”total_prompts is provisioned by the plan or server operator. An app owner can see it but cannot
increase it through the allocation request.
Owners choose one allocation mode:
fluid: every enabled member draws from the shared app remainder.equal: each enabled member receivesfloor(total / enabled members); an integer remainder stays unallocated.custom: the owner assigns an explicit non-negative allowance per member, with a combined maximum no larger than the app total. The owner can assign their own allowance to zero.
When generated analysis is implemented, the app total and member allowance will be enforced atomically. A prompt is rejected if AI is disabled, the member has no access, the app pool is exhausted, or a non-fluid member allowance is exhausted.
Console API
Section titled “Console API”GET /v1/sites/{siteId}/aiPUT /v1/sites/{siteId}/aiPOST /v1/sites/{siteId}/promptThe owner update body is:
{ "enabled": true, "allocation_mode": "custom", "members": [ { "user_id": "user-id", "ai_access": true, "allocated_prompts": 250 } ]}The prompt body is { "prompt": "..." }. The current response is 501 Not Implemented; a future successful response will return
the remaining app and member counts; it intentionally contains no generated answer in this phase.