Admin Ai
GET /api/admin/ai-settings
Section titled “GET /api/admin/ai-settings”Get Platform Ai Settings
Current platform AI scalars. Null fields defer to the env defaults.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | PlatformAISettingsResponse |
| 422 | Validation Error | HTTPValidationError |
PATCH /api/admin/ai-settings
Section titled “PATCH /api/admin/ai-settings”Update Platform Ai Settings
Update platform AI scalars.
Values land in platform_settings and are re-read per run, so a change
here reaches running workers within their catalog/settings TTL — no deploy.
The default model is checked against the catalog before it is stored: it is what every org without a default of its own runs on, so a typo’d or retired id here would silently break all of them at the next turn instead of here, now, with a list of the ids that would have worked.
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| compaction_enabled | boolean | no | |
| compaction_threshold | number | no | |
| default_model | PlatformDefaultModelInput | no | |
| default_reasoning_effort | string | no | |
| max_reasoning_effort | string | no | |
| thinking_enabled | boolean | no |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | PlatformAISettingsResponse |
| 422 | Validation Error | HTTPValidationError |
GET /api/admin/models
Section titled “GET /api/admin/models”List Catalog Models
Every catalog row, enabled or not, in display order.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ModelCatalogEntryResponse[] |
| 422 | Validation Error | HTTPValidationError |
POST /api/admin/models
Section titled “POST /api/admin/models”Create Catalog Model
Add a model. key must be unique — it’s what agents store.
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| allowed_efforts | string[] | no | |
| cache_write_price_per_1m | number | string | no | |
| cached_input_price_per_1m | number | string | no | |
| cost_tier | string | no | |
| enabled | boolean | no | |
| input_price_per_1m | number | string | no | |
| key | string | yes | |
| kind | string | no | |
| label | string | yes | |
| max_output_tokens | integer | no | |
| output_price_per_1m | number | string | no | |
| provider | string | yes | |
| replacement_model_id | string (uuid) | no | |
| sort_order | integer | no | |
| supports_reasoning | boolean | no | |
| supports_vision | boolean | no |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Successful Response | ModelCatalogEntryResponse |
| 422 | Validation Error | HTTPValidationError |
PATCH /api/admin/models/{entry_id}
Section titled “PATCH /api/admin/models/{entry_id}”Update Catalog Model
Update a model. Switching enabled off takes effect platform-wide.
Runs already pinned to a disabled model are not rewritten: they resolve to
replacement_model_id (or the platform default) lazily at dispatch.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| entry_id | path | string (uuid) | yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| allowed_efforts | string[] | no | |
| cache_write_price_per_1m | number | string | no | |
| cached_input_price_per_1m | number | string | no | |
| cost_tier | string | no | |
| deprecated | boolean | no | |
| enabled | boolean | no | |
| input_price_per_1m | number | string | no | |
| kind | string | no | |
| label | string | no | |
| max_output_tokens | integer | no | |
| output_price_per_1m | number | string | no | |
| provider | string | no | |
| replacement_model_id | string (uuid) | no | |
| sort_order | integer | no | |
| supports_reasoning | boolean | no | |
| supports_vision | boolean | no |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ModelCatalogEntryResponse |
| 422 | Validation Error | HTTPValidationError |
DELETE /api/admin/models/{entry_id}
Section titled “DELETE /api/admin/models/{entry_id}”Delete Catalog Model
Remove a model from the catalog.
Prefer disabling: a deleted row loses its replacement pointer, so anything still pinned to the key falls all the way through to the platform default.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| entry_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | Successful Response | |
| 422 | Validation Error | HTTPValidationError |
POST /api/admin/models/{entry_id}/sync-price
Section titled “POST /api/admin/models/{entry_id}/sync-price”Sync Catalog Model Price
Re-price one model from the community LiteLLM dataset.
A convenience for identifying prices, not a runtime dependency: runs bill from the catalog, and this is one way to fill it. Deliberate per-row action, so it does overwrite what’s there — the boot-time sweep is the one that only fills blanks, precisely so a hand-typed price survives it.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| entry_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ModelCatalogEntryResponse |
| 422 | Validation Error | HTTPValidationError |
GET /api/admin/orgs/{org_id}/ai-settings
Section titled “GET /api/admin/orgs/{org_id}/ai-settings”Get Org Ai Settings
One org’s runtime overrides, plus the platform values behind its nulls.
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/admin/orgs/{org_id}/ai-settings
Section titled “PATCH /api/admin/orgs/{org_id}/ai-settings”Update Org Ai Settings
Set (or clear) one org’s runtime overrides on its behalf.
Writes the same rows the org’s own settings page writes, so support flipping a single org and that org flipping itself are the same operation — and the platform tier stays where everyone else reads it.
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 |