Get started

How a request is handled

What happens in the fraction of a second between an app sending a message and getting an answer. You can see each of these steps for any request: open it in Requests and look at the Decision trace.

  1. Identify

    The API key tells the gateway which app is calling, which team owns it and which governance profile applies. Unknown, revoked or expired keys are refused.

  2. Classify

    Every message is scanned for health data, personal details, card numbers, secrets, government-controlled and confidential data, using patterns, checksums and clinical context. The app can also declare data with the X-AIGov-Sensitivity header.

  3. Redact

    Sensitive values are replaced with typed placeholders before the request leaves, so the model still understands the task.

  4. Policy

    Your ordered rules and compliance frameworks decide what is allowed. Anything no rule allows is denied.

  5. Risk

    Prompt-injection checks, optional guardrail models and a risk score decide whether to allow, hold for review or block.

  6. Route

    The request goes to the best destination your rules allow for this data, with fallbacks if one is unavailable.

  7. Verify

    The gateway checks which model actually answered. If it isn't one the policy allowed, the request fails closed.

  8. Meter

    Tokens and cost are recorded per team, workload and person, against budgets and plan limits.

  9. Audit

    The decision and its reasons are written to a hash-chained log that shows if anyone alters it.

An example

A clinical note app using the HIPAA · Clinical profile asks for gpt-4o to summarise "Patient John Carter, MRN 00482913, chest pain…".

  • The gateway finds health data, so the rule health-data-on-prem-first applies.
  • HIPAA only allows on-prem models or providers with a signed BAA, so the request is redirected to your on-prem Llama model.
  • Because it stays in your data centre, the record number isn't redacted.
  • The answer comes back as normal. The response headers say what happened: X-AIGov-Decision: redirect and X-AIGov-Model: llama-3.1-70b.

Decisions

DecisionWhat happened
allowSent to the model the app asked for.
redirectPolicy didn't allow the requested model for this data, so an allowed one answered. X-AIGov-Model names it.
denyRefused with HTTP 403. The error message names the reason and the request ID.
heldWaiting for a person to approve it under Approvals (HTTP 403, held_for_review).