# Update model settings Update the model availability settings for an organization. Allows administrators to disable specific AI providers or models, and set a default model. Only fields included in the request body are updated; omitted fields remain unchanged. Requires **Admin** or **Owner** role within the organization. Uses a "disabled list" pattern: all providers and models are available by default, and this endpoint lets you selectively disable specific ones. ## Path Parameters **`organization_id`** string required The unique identifier of the organization (e.g., `org_abc123def456`). ## Request Body All fields are optional. Only include fields you want to update. **`disabledProviders`** array optional List of provider slugs to disable. Valid values: `openai`, `anthropic`, `aitronos`, `google`, `mistral`, `cohere`. Pass an empty array `[]` to re-enable all providers. When a provider is disabled, none of its models will be available to organization members. Also accepts snake_case alias `disabled_providers`. **`disabledModels`** array optional List of individual model keys to disable (e.g., `["gpt-4o-mini", "claude-3-haiku"]`). Pass an empty array `[]` to re-enable all models. This allows fine-grained control over specific models even when their provider is enabled. Also accepts snake_case alias `disabled_models`. **`defaultModelKey`** string/null optional The default model key for the organization. Set to `null` to clear the default. Also accepts snake_case alias `default_model_key`. ## Returns An `OrganizationModelSettingsResponse` object containing: - **`disabled_providers`** -- list of provider slugs that are disabled for the organization. - **`disabled_models`** -- list of model keys that are disabled for the organization. - **`default_model_key`** -- the default model key for the organization, or `null` if not set. - **`updated_at`** -- ISO 8601 timestamp of the last update. - **`updated_by`** -- user ID of who last updated the settings. Request ```bash cURL curl -X PATCH "https://api.aitronos.com/v1/organizations/org_abc123def456/model-settings" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "disabledProviders": ["google", "mistral"], "disabledModels": ["gpt-4o-mini"], "defaultModelKey": "claude-sonnet-4-6" }' ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") settings = client.organizations.update_model_settings( organization_id="org_abc123def456", disabledProviders=["google", "mistral"], disabledModels=["gpt-4o-mini"], defaultModelKey="claude-sonnet-4-6", ) print(settings) ``` ```python Python import os import requests token = os.environ["ACCESS_TOKEN"] organization_id = "org_abc123def456" response = requests.patch( f"https://api.aitronos.com/v1/organizations/{organization_id}/model-settings", headers={ "Authorization": f"Bearer {token}", "Content-Type": "application/json" }, json={ "disabledProviders": ["google", "mistral"], "disabledModels": ["gpt-4o-mini"], "defaultModelKey": "claude-sonnet-4-6" } ) settings = response.json() print(settings) ``` ```javascript JavaScript const token = process.env.ACCESS_TOKEN; const organizationId = 'org_abc123def456'; const response = await fetch( `https://api.aitronos.com/v1/organizations/${organizationId}/model-settings`, { method: 'PATCH', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ disabledProviders: ['google', 'mistral'], disabledModels: ['gpt-4o-mini'], defaultModelKey: 'claude-sonnet-4-6' }) } ); const settings = await response.json(); console.log(settings); ``` Response ```json 200 - OK { "disabled_providers": ["google", "mistral"], "disabled_models": ["gpt-4o-mini"], "default_model_key": "claude-sonnet-4-6", "updated_at": "2026-03-01T10:30:00Z", "updated_by": "usr_abc123def456" } ``` ```json 401 - Unauthorized { "success": false, "error": { "code": "AUTHENTICATION_REQUIRED", "message": "User authentication required", "system_message": "Authentication required", "type": "client_error", "status": 401, "details": {}, "trace_id": "abc-123-def", "timestamp": "2026-03-01T10:30:00Z" } } ``` ```json 403 - Forbidden { "success": false, "error": { "code": "INSUFFICIENT_PERMISSIONS", "message": "You must be an Admin or Owner to perform this action", "system_message": "Insufficient permissions", "type": "client_error", "status": 403, "details": { "organization_id": "org_abc123def456" }, "trace_id": "abc-123-def", "timestamp": "2026-03-01T10:30:00Z" } } ``` ```json 422 - Validation Error { "success": false, "error": { "code": "INVALID_PROVIDER_SLUG", "message": "Invalid provider slugs: invalid_provider", "system_message": "Invalid provider slugs: invalid_provider", "type": "client_error", "status": 422, "details": { "invalid_providers": ["invalid_provider"], "valid_providers": ["aitronos", "anthropic", "cohere", "google", "mistral", "openai"] }, "trace_id": "abc-123-def", "timestamp": "2026-03-01T10:30:00Z" } } ``` ## Related Resources - [Get Model Settings](/docs/api-reference/organizations/management/get-model-settings) - [List Organizations](/docs/api-reference/organizations/management/list) - [Retrieve Organization](/docs/api-reference/organizations/management/retrieve) - [Update Organization](/docs/api-reference/organizations/management/update) - [List Models](/docs/api-reference/organizations/list-models)