Org Settings
GET /api/orgs/{org_id}/model-config
Section titled “GET /api/orgs/{org_id}/model-config”Get Model Config
Return the org’s model policy (allowlists + defaults) per scope.
Readable by any org member — it drives client-side model-picker filtering and default selection. The real enforcement is server-side (agent CRUD + chat send), so this endpoint carries no secrets and no budget data.
Requires membership.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ModelConfigResponse |
| 422 | Validation Error | HTTPValidationError |
GET /api/orgs/{org_id}/settings/ai
Section titled “GET /api/orgs/{org_id}/settings/ai”Get Ai Settings
Get AI provider settings for the organization (secrets redacted).
Requires ADMIN or OWNER role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | AIProviderSettingsResponse |
| 422 | Validation Error | HTTPValidationError |
PATCH /api/orgs/{org_id}/settings/ai
Section titled “PATCH /api/orgs/{org_id}/settings/ai”Update Ai Settings
Update AI provider settings for the organization.
Requires ADMIN or OWNER role. Only fields present in the request body are updated; omitted fields are left unchanged.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| ai_gateway_account_id | string | no | |
| ai_gateway_gateway_id | string | no | |
| ai_gateway_log_payloads | string | no | |
| ai_gateway_mode | "" | "custom" | "off" | no | |
| ai_gateway_token | string | no | |
| anthropic_api_key | string | no | |
| anthropic_base_url | string | no | |
| anthropic_credential_source | "" | "api_key" | "cloudflare" | no | |
| anthropic_enabled | "" | "true" | "false" | no | |
| openai_api_key | string | no | |
| openai_base_url | string | no | |
| openai_credential_source | "" | "api_key" | "cloudflare" | no | |
| openai_enabled | "" | "true" | "false" | no |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | AIProviderSettingsResponse |
| 422 | Validation Error | HTTPValidationError |
GET /api/orgs/{org_id}/settings/limits
Section titled “GET /api/orgs/{org_id}/settings/limits”Get Org Limits
Get model governance (two allowlists + defaults) and budget for the org.
Requires ADMIN or OWNER role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | OrgLimitsResponse |
| 422 | Validation Error | HTTPValidationError |
PATCH /api/orgs/{org_id}/settings/limits
Section titled “PATCH /api/orgs/{org_id}/settings/limits”Update Org Limits
Update the org’s two model allowlists, default models, and/or budget.
Only fields present in the request body are updated; omitted fields are left
unchanged. For default-model fields, an explicit null clears the default.
Invariant: when a scope’s allowlist is non-empty, its default model must be
set and within the allowlist (422 otherwise). Response affected_agents
lists agents left outside the (new) agent allowlist — they downgrade to the
agent default at run time.
Requires ADMIN or OWNER role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| agent_default_model | DefaultModel | no | |
| agent_model_allowlist | string[] | no | |
| budget_limit_usd | string | no | |
| chat_default_model | DefaultModel | no | |
| chat_model_allowlist | string[] | no | |
| process_default_model | DefaultModel | no | |
| prompt_model_allowlist | string[] | no | |
| tool_router_default_model | ToolRouterDefaultModel | no |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | OrgLimitsResponse |
| 422 | Validation Error | HTTPValidationError |
GET /api/orgs/{org_id}/settings/limits/usage
Section titled “GET /api/orgs/{org_id}/settings/limits/usage”Get Org Limits Usage
Get the org’s current spend vs. its configured budget cap.
Returns two spend figures (M11 — see OrgLimitsUsageResponse): the
chat-attributed total the budget cap enforces against (spend_usd) and
the fuller metered total including chat-less LLM calls
(metered_spend_usd), so the two no longer read as unlabelled
disagreeing numbers. Useful for the admin limits panel.
Requires ADMIN or OWNER role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | OrgLimitsUsageResponse |
| 422 | Validation Error | HTTPValidationError |
GET /api/orgs/{org_id}/settings/runtime
Section titled “GET /api/orgs/{org_id}/settings/runtime”Get Runtime Settings
Get the org’s AI runtime overrides (compaction + model thinking).
A null field means the org inherits; platform_defaults says what that
inheritance currently resolves to.
Requires ADMIN or OWNER role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | OrgRuntimeSettingsResponse |
| 422 | Validation Error | HTTPValidationError |
PATCH /api/orgs/{org_id}/settings/runtime
Section titled “PATCH /api/orgs/{org_id}/settings/runtime”Update Runtime Settings
Set (or clear) the org’s AI runtime overrides.
Omitted fields are left unchanged; an explicit null drops the override
so the setting falls back to the platform tier. Values are re-read at the
start of every run, so a change here lands on the next turn.
Requires ADMIN or OWNER role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| compaction_enabled | boolean | no | |
| compaction_threshold | number | no | |
| thinking_enabled | boolean | no |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | OrgRuntimeSettingsResponse |
| 422 | Validation Error | HTTPValidationError |