Skip to content

Emergency Kill Switch API

The Kill Switch API provides instant, admin-controlled disabling and re-enabling of any provider or model without a service restart. Disabled state is persisted to the database and survives gateway restarts. Every action is written to the audit log with the actor identity, target, and reason.

All endpoints require admin authentication (Authorization: Bearer $ARBITEX_API_KEY).

Base URL: https://gateway.arbitex.ai


Scenario Recommended action
Planned maintenance — rotating provider credentials or reconfiguring a model Disable the target before the window; re-enable after verification
Cost runaway — unexpected spend spike from a provider or model Disable immediately to stop traffic; investigate, then re-enable
Security event — compromised provider credentials or a model producing harmful output Disable immediately; do not re-enable until the incident is resolved
Provider outage — provider is returning consistent errors and the health monitor has not yet disengaged it Disable manually to prevent retries consuming quota; re-enable when the provider confirms recovery

The kill switch acts independently of the automatic health monitor. A kill-switched provider is never re-enabled automatically — an admin must call the enable endpoint. See Kill switch vs health monitoring for details.


Method Path Description
GET /api/v1/admin/kill-switch/providers List all providers with kill switch state
POST /api/v1/admin/kill-switch/providers/{provider}/disable Disable all models for a provider
POST /api/v1/admin/kill-switch/providers/{provider}/enable Re-enable all models for a provider
Method Path Description
GET /api/v1/admin/kill-switch/models/{model_config_id} Get kill switch state for a single model
POST /api/v1/admin/kill-switch/models/{model_config_id}/disable Disable a single model
POST /api/v1/admin/kill-switch/models/{model_config_id}/enable Re-enable a single model

Returned by provider-level list, disable, and enable endpoints.

Field Type Description
provider string Provider identifier (e.g. anthropic, openai)
total_models int Total number of catalog entries for this provider
kill_switch_disabled_count int Number of models currently kill-switched
kill_switch_active bool true if any model in the provider has the kill switch engaged
models KillSwitchStateResponse[] Per-model kill switch states

Returned by model-level endpoints and as models entries in ProviderKillSwitchSummary responses.

Field Type Description
id UUID ModelConfig primary key
provider string Provider identifier (e.g. anthropic, openai, google)
model_id string Model identifier (e.g. claude-sonnet-4-20250514, gpt-4o)
display_name string Human-readable model name from the admin catalog
is_active bool Admin catalog active flag — whether the model is available for routing; independent of the kill switch
kill_switch_active bool true if the kill switch is currently engaged (model is disabled)
kill_switch_disabled_at datetime | null Timestamp when the kill switch was last engaged, or null if currently enabled
disabled_reason string | null The DisabledReason value provided at disable time, or null if currently enabled
Value Description
maintenance Planned maintenance window
cost_runaway Unexpected cost spike
security_event Security incident response
other Unspecified reason

GET /api/v1/admin/kill-switch/providers

Returns all configured providers with a summary of their kill switch state.

Request

Terminal window
curl -s https://gateway.arbitex.ai/api/v1/admin/kill-switch/providers \
-H "Authorization: Bearer $ARBITEX_API_KEY"

Response 200 OK — array of ProviderKillSwitchSummary

[
{
"provider": "anthropic",
"total_models": 4,
"kill_switch_disabled_count": 0,
"kill_switch_active": false,
"models": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"provider": "anthropic",
"model_id": "claude-sonnet-4-20250514",
"display_name": "Claude Sonnet 4",
"is_active": true,
"kill_switch_active": false,
"kill_switch_disabled_at": null,
"disabled_reason": null
}
]
},
{
"provider": "openai",
"total_models": 6,
"kill_switch_disabled_count": 6,
"kill_switch_active": true,
"models": []
},
{
"provider": "google",
"total_models": 3,
"kill_switch_disabled_count": 1,
"kill_switch_active": true,
"models": []
}
]

kill_switch_active at the provider level is true when any model in the provider has the kill switch engaged. kill_switch_disabled_count is the number of individual models currently disabled. The models array contains a KillSwitchStateResponse entry for each model; the response above abbreviates this for brevity.


POST /api/v1/admin/kill-switch/providers/{provider}/disable

Immediately disables all models for the specified provider. Requests targeting any model under this provider return 503 provider_unavailable until re-enabled. The gateway writes one audit log entry per disabled model.

Path parameters

Parameter Type Description
provider string Provider identifier (anthropic, openai, google, etc.)

Request body

Field Type Required Description
reason string yes One of the DisabledReason values

Request — disable OpenAI due to security incident

Terminal window
curl -s -X POST \
https://gateway.arbitex.ai/api/v1/admin/kill-switch/providers/openai/disable \
-H "Authorization: Bearer $ARBITEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "security_event"}'

Response 200 OKProviderKillSwitchSummary for the provider with all models disabled

{
"provider": "openai",
"total_models": 6,
"kill_switch_disabled_count": 6,
"kill_switch_active": true,
"models": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"provider": "openai",
"model_id": "gpt-4o",
"display_name": "GPT-4o",
"is_active": true,
"kill_switch_active": true,
"kill_switch_disabled_at": "2026-03-12T14:07:33Z",
"disabled_reason": "security_event"
}
]
}

POST /api/v1/admin/kill-switch/providers/{provider}/enable

Re-enables all kill-switched models for the provider. Traffic resumes immediately. The gateway writes one audit log entry per re-enabled model.

Path parameters

Parameter Type Description
provider string Provider identifier

No request body required.

Request — re-enable OpenAI after incident resolution

Terminal window
curl -s -X POST \
https://gateway.arbitex.ai/api/v1/admin/kill-switch/providers/openai/enable \
-H "Authorization: Bearer $ARBITEX_API_KEY"

Response 200 OKProviderKillSwitchSummary for the provider with all models re-enabled

{
"provider": "openai",
"total_models": 6,
"kill_switch_disabled_count": 0,
"kill_switch_active": false,
"models": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"provider": "openai",
"model_id": "gpt-4o",
"display_name": "GPT-4o",
"is_active": true,
"kill_switch_active": false,
"kill_switch_disabled_at": null,
"disabled_reason": null
}
]
}

GET /api/v1/admin/kill-switch/models/{model_config_id}

Returns the current kill switch state for a single model.

Path parameters

Parameter Type Description
model_config_id UUID ModelConfig primary key

Request

Terminal window
curl -s \
https://gateway.arbitex.ai/api/v1/admin/kill-switch/models/3fa85f64-5717-4562-b3fc-2c963f66afa6 \
-H "Authorization: Bearer $ARBITEX_API_KEY"

Response 200 OK

{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"provider": "anthropic",
"model_id": "claude-sonnet-4-20250514",
"display_name": "Claude Sonnet 4",
"is_active": true,
"kill_switch_active": false,
"kill_switch_disabled_at": null,
"disabled_reason": null
}

Response 404 Not Found — model config ID does not exist within the tenant.


POST /api/v1/admin/kill-switch/models/{model_config_id}/disable

Disables a single model. Requests targeting this specific model return 503 provider_unavailable. Other models for the same provider are unaffected.

Path parameters

Parameter Type Description
model_config_id UUID ModelConfig primary key

Request body

Field Type Required Description
reason string yes One of the DisabledReason values

Request — disable a model for scheduled maintenance

Terminal window
curl -s -X POST \
https://gateway.arbitex.ai/api/v1/admin/kill-switch/models/3fa85f64-5717-4562-b3fc-2c963f66afa6/disable \
-H "Authorization: Bearer $ARBITEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "maintenance"}'

Response 200 OK — the updated KillSwitchStateResponse

{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"provider": "anthropic",
"model_id": "claude-sonnet-4-20250514",
"display_name": "Claude Sonnet 4",
"is_active": true,
"kill_switch_active": true,
"kill_switch_disabled_at": "2026-03-12T02:00:00Z",
"disabled_reason": "maintenance"
}

Request — disable a model due to cost runaway

Terminal window
curl -s -X POST \
https://gateway.arbitex.ai/api/v1/admin/kill-switch/models/a1b2c3d4-e5f6-7890-abcd-ef1234567890/disable \
-H "Authorization: Bearer $ARBITEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "cost_runaway"}'

Response 200 OK

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"provider": "openai",
"model_id": "gpt-4o",
"display_name": "GPT-4o",
"is_active": true,
"kill_switch_active": true,
"kill_switch_disabled_at": "2026-03-12T09:22:15Z",
"disabled_reason": "cost_runaway"
}

Response 404 Not Found — model config ID does not exist within the tenant.


POST /api/v1/admin/kill-switch/models/{model_config_id}/enable

Re-enables a single kill-switched model. Traffic to that model resumes immediately.

Path parameters

Parameter Type Description
model_config_id UUID ModelConfig primary key

Request

Terminal window
curl -s -X POST \
https://gateway.arbitex.ai/api/v1/admin/kill-switch/models/3fa85f64-5717-4562-b3fc-2c963f66afa6/enable \
-H "Authorization: Bearer $ARBITEX_API_KEY"

Response 200 OK — the updated KillSwitchStateResponse

{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"provider": "anthropic",
"model_id": "claude-sonnet-4-20250514",
"display_name": "Claude Sonnet 4",
"is_active": true,
"kill_switch_active": false,
"kill_switch_disabled_at": null,
"disabled_reason": null
}

Response 404 Not Found — model config ID does not exist within the tenant.


Every enable and disable action is written to the audit log synchronously — the API response is not returned until the audit record is committed.

Field Description
action kill_switch_disable when a model is disabled; kill_switch_enable when re-enabled
actor_id UUID of the admin who performed the action
target_provider The affected provider identifier (e.g. openai)
target_model The affected model identifier (e.g. gpt-4o), or "*" for provider-wide actions
reason The DisabledReason value provided in the request body
timestamp ISO 8601 timestamp of the action

For provider-level disable/enable calls, the gateway writes one audit entry per model affected. A provider with six models produces six audit records — one per model — allowing per-model audit trail queries.

Audit entries are forwarded to your SIEM alongside request audit entries. Query them in the audit log API using action=kill_switch_disable or action=kill_switch_enable.


  • Requests routed to a kill-switched model return 503 provider_unavailable immediately, before the request reaches the provider.
  • Fallback chains skip kill-switched entries automatically. If gpt-4o is disabled and listed as a secondary in a fallback chain, the gateway proceeds to the next entry.
  • If all entries in a fallback chain are kill-switched, the request returns 503 provider_unavailable with no further fallback attempts.
  • Requests already in flight when the switch is activated complete normally — the kill switch applies to new requests only.
  • The kill switch state is persisted to the database. It survives gateway restarts and pod recycling.

Status Condition
400 Bad Request Missing or invalid reason value
403 Forbidden Caller is not an admin
404 Not Found Provider or model config ID does not exist within the tenant