Per-subaccount AI configuration
Every subaccount under your parent organization resolves its own AI configuration: whether AI features (agents, insights, AI-assisted messaging) are enabled, which curated model provider they run on, and whether the usage is comped. You set all three boundaries separately per child, so one subaccount’s defaults never leak into the next. This is the narrative guide forGET /api/v1/subaccounts/{id}/ai-config and PUT /api/v1/subaccounts/{id}/ai-config. Field-level reference: Subaccounts API. For the full reseller flow this plugs into, see White-label subaccounts.
What the config governs
Three controls per subaccount, stored as one settings object and resolved together:
Reads return two layers side by side:
stored (exactly what you recorded, nulls included) and the resolved effective values plus providerSource — stored when you pinned a provider, platform_default when the child falls through to the default. That distinction is what you audit: how many children actually carry an override versus ride the default.
Why set it per child
Isolating billing and behavior per child organization is the point of subaccounts; AI configuration follows the same rule:- A customer on a lower tier can have AI disabled while the rest stay enabled — one PUT, no plan change.
- A child pinned to a specific provider keeps that choice; new subaccounts keep the platform default until you pin them.
- A comped child never accumulates AI charges against your consolidated reseller statement.
Read the current config
GET /api/v1/subaccounts/{id}/ai-config returns the resolved view plus the selectable provider catalog in one round trip. Owner or admin on the parent organization is required.
Update the config
PUT the same path with all three fields — the body is full-set:
422; unlike branding or pricing writes, nulls here are meaningful (see Reset semantics). The response echoes the resolved view back, so your automation re-renders the effective state without a second GET.
Worked sample — disable AI and comp a child
Disable AI for a subaccount while absorbing its remaining AI usage as free:200
catalog array with every selectable provider — render that, never a hard-coded list.
Reset semantics
Reset is a write through the same endpoint — there is no separate reset route. When a child asks you to restore defaults, clear the override by sending nulls:enabled: nullclears the on/off override back to inherit — AI on again.provider: nullclears the pin back to the platform default, andproviderSourceflips back toplatform_default.comped: falseturns the free-usage marker off. It never clears itself by passingnull; sendfalseexplicitly.
When comped is appropriate
Comped is a billing statement you make on behalf of the child: their AI usage counts as free. Reach for it when:- You bundle AI into the customer’s flat subscription instead of metering it back to them.
- You’re running a pilot or proof-of-concept and absorbing the AI cost during evaluation.
- A service credit or goodwill adjustment is owed and you comp usage rather than refund the statement.
false — set it deliberately, and unset it the same way.
Anti-patterns
- Setting
enabled: falseto control spend — use channel budgets or a monthly spend cap for budget control;enabledgates the feature, not the wallet. - Hard-coding provider keys in your portal — render the
catalogarray from the GET response so your UI tracks the selectable set. - Assuming a PUT is partial-update — the body is full-set; read-modify-write with nulls preserved, or you silently clear overrides.
See also
- Subaccounts API — full endpoint catalog
- White-label subaccounts — the reseller flow this configures
- Audit log — where every AI-config write lands
- Subaccount–organization model — what child-organization isolation covers