Update a model availability policy
Changed onReplace a model availability policy's name and config, and optionally its assignments. Management key required.
Request
- Base URLhttps://openrouter.ai/api/v1
- AuthHTTP bearer
Path parameters
Policy ID
Request body
Complete new list of assigned API keys. Send together with member_ids, or omit both to keep the stored assignments.
Omit to keep the stored default status; false unsets the policy as the workspace default.
Complete new list of assigned members. Send together with api_key_hashes, or omit both to keep the stored assignments.
Policy name
API key hashes
Organization member user IDs
Workspace the policy belongs to. Required for an organization management key; a workspace-scoped key defaults to its own workspace and gets 403 for any other.
Example request
{
"api_key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
],
"config": {
"allowed_models": [
"openai/gpt-4o",
"anthropic/claude-sonnet-4"
],
"allowed_providers": [
"openai",
"anthropic"
],
"enforce_zdr_anthropic": true,
"enforce_zdr_openai": true
},
"member_ids": [
"user_2abcDEFghiJKLmnoPQRstu"
],
"name": "Engineering monthly budget",
"opted_out_api_key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
],
"opted_out_member_ids": [
"user_2abcDEFghiJKLmnoPQRstu"
],
"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"
}Response
model availability policy updated
Example response
{
"data": {
"config": {
"allowed_models": [
"openai/gpt-4o",
"anthropic/claude-sonnet-4"
],
"allowed_providers": [
"openai",
"anthropic"
],
"enforce_zdr_anthropic": true,
"enforce_zdr_openai": true
},
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Engineering monthly budget"
}
}Changes
- info
added the new optional request property
config/allow_safety_retention_openai - info
added the optional property
data/config/allow_safety_retention_openaito the response with the status
- info
- info
added the new optional request property
config/allow_provisional_providers
1 more change in this revision
- info