Skip to main content
Help AI Gateway
AI Gateway

Reading the EU AI Act risk-class header on gateway completions

2 min read·1 views·100% found this helpful

Every completion returned by the AI Gateway includes an X-AI-Risk-Class response header. It tells you the EU AI Act risk classification of the model that served your request, so you can log, route, or gate traffic on compliance requirements without inspecting the model yourself.

What the header is

X-AI-Risk-Class is set on every response from the gateway completions endpoint. Its value is the EU AI Act risk tier assigned to the model that handled the request. The classification is applied at the gateway level on every completion — it is part of the response contract, not an optional add-on.

The header takes one of four values:

  • MINIMAL — everyday, low-risk use
  • LIMITED — subject to transparency obligations
  • HIGH — subject to enhanced obligations under the Act
  • UNACCEPTABLE — prohibited use categories

How to read it

Send a normal completion request and inspect the response headers.

bash
curl -i https://api.g8kepr.com/api/v1/gateway/completions \
  -H "Authorization: Bearer $G8KEPR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4", "messages": [{"role": "user", "content": "Hello"}]}'

The response includes the header alongside your completion:

http
HTTP/1.1 200 OK
Content-Type: application/json
X-AI-Risk-Class: LIMITED

Read it from your HTTP client the same way you read any response header:

  1. 1.Make your completion request as usual.
  2. 2.Read the X-AI-Risk-Class value from the response headers.
  3. 3.Record it in your own logs, or branch your application logic on the value.

Store the header value alongside each request in your own audit trail. Combined with the gateway's built-in completion audit log, this gives you an end-to-end record of which risk tier served every call.

Using it in your application

  • Logging — persist the value with each request for your compliance records.
  • Routing — steer sensitive workloads toward models in a preferred tier.
  • Gating — reject or flag responses above a risk threshold your policy allows.

The risk class reflects the model, not the content of an individual prompt. To inspect and filter the content of prompts and completions, see Guardrails and content policies.

Related

Was this helpful?Still stuck? Submit a request →

Related articles