policy_engine

Resolve Policies For Context

Resolve which policies and guardrails apply for a given context.

Use this endpoint to debug "what guardrails would apply to a request with this team/key/model/tags combination?"

Example Request:

curl -X POST "http://localhost:4000/policies/resolve" \
    -H "Authorization: Bearer <your_api_key>" \
    -H "Content-Type: application/json" \
    -d '{
        "tags": ["healthcare"],
        "model": "gpt-4"
    }'
post/policies/resolve

Request

  • Base URL: https://docs.litellm.com.cn (the document declares no server; this is the origin it was published from)
  • URL: https://docs.litellm.com.cn/policies/resolve
  • Auth: API key in header x-litellm-api-key

Query parameters

force_syncboolean

Force a DB sync before resolving. Default uses in-memory cache.

Request body

key_aliasstring nullable

Key alias to resolve for.

modelstring nullable

Model name to resolve for.

tagsstring[] nullable

Tags to resolve for.

team_aliasstring nullable

Team alias to resolve for.

Response

Successful Response

effective_guardrailsstring[]

Final list of guardrails that would be applied.

Changes

No recorded changes to this operation across all 1 revision of this API.