package.json, which lists the package name, version, inbound fragments, and outbound fragments.- XML policy fragments that APIM executes during inbound or outbound processing.
v2 Request Evaluations
Package:v2-request-evals
Inbound fragments:
hl-oauth-token-managementhl-v2-request-evaluations
hl-v2-surface-runtime-action
POST /detection/v2/request-evaluations before APIM forwards the request to the backend. HiddenLayer returns the original request, a redacted request, or a provider-shaped block response. When HiddenLayer returns hl-runtime-action: BLOCK, APIM returns the block response without calling the backend.
v2 Response Evaluations
Package:v2-response-evals
Inbound fragments:
hl-oauth-token-managementhl-v2-response-evals-inbound
hl-v2-response-evaluations
POST /detection/v2/response-evaluations in outbound processing. HiddenLayer returns the original response, a redacted response, or a provider-shaped block response.
The response package skips response evaluation for:
- model discovery requests such as
GET /v1/models - streaming requests
- empty responses
- non-JSON responses
v1 Interactions
Package:v1-interactions
Inbound fragments:
hl-oauth-token-managementhl-interactions-input
hl-interactions-output
POST /detection/v1/interactions for input and output evaluation.
Provider Compatibility
Provider support is determined by the package, not by APIM:Choosing a package for non-OpenAI providersPick
v2-request-evals and/or v2-response-evals. The APIM fragments stay provider-agnostic; provider support is governed by HiddenLayer’s v2 evaluation APIs. If a new provider is added to HiddenLayer Runtime, no APIM fragment change is required — set HL-Provider-Id on the request if HiddenLayer cannot infer the provider from the payload alone.Header Behavior
The v2 packages forward these headers to HiddenLayer when available:
HiddenLayer metadata headers are removed before APIM forwards the request to the backend.

