Guardrails

Bulk unassign keys from a guardrail

Unassign multiple API keys from a specific guardrail. Management key required.

post/guardrails/{id}/assignments/keys/remove

Request

  • Base URL: https://openrouter.ai/api/v1
  • URL: https://openrouter.ai/api/v1/guardrails/{id}/assignments/keys/remove
  • Auth: HTTP bearer

Path parameters

idstring uuid required

The unique identifier of the guardrail

Example:550e8400-e29b-41d4-a716-446655440000

Request body

key_hashesstring[] required

Array of API key hashes to unassign from the guardrail

Example request

{
  "key_hashes": [
    "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
  ]
}

Response

Unassignment result

unassigned_countinteger required

Number of keys successfully unassigned

Example response

{
  "unassigned_count": 3
}

Changes

No recorded changes to this operation across all 375 revisions of this API.