Developer docs · Quick start · about 5 minutes

Quick start

This guide takes you from zero to your first checked request. You create a key, point your existing OpenAI-compatible client at Gateboard, send a request, and read the decision receipt. Your prompts, models and application code stay as they are.

What you need

  • A Gateboard account. Sign up if you do not have one.
  • An application that calls an LLM through an OpenAI-compatible client: the official OpenAI SDKs, LangChain, LlamaIndex, or plain HTTP.
  • Permission to change one configuration value (the base URL) and one secret (the API key).

Step 1: Create a key and pick its sector pack

Open the Keys page, give the key a name, and choose the policy pack it enforces, for example kids, patients or banking. The pack travels with the key: your code never names it, and changing the pack never needs a deploy.

One key per product and environment

Use separate keys for staging and production, and for products in different sectors. Each key has its own pack, model list, budget and evidence trail.

Step 2: Change the base_url

Point your client at the Gateboard gateway and use the new key. Store the key as a secret, never in code.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://gw.gateboard.ai/v1",
    api_key=os.environ["SENTRIA_API_KEY"],
)

Step 3: Send a request

Send any request. This one contains a name and a phone number, so with the patients or kids pack you can see redaction at work.

resp = client.chat.completions.create(
    model="phoeniqs-glm5",
    messages=[{"role": "user", "content": "My name is Mario Rossi, call me on +39 333 123 4567"}],
)
print(resp.choices[0].message.content)

The response has the usual OpenAI shape. When a control changed something, the content ends with the marker [SENTRIA_GUARDRAILS_APPLIED] and, depending on the pack, a notice such as an AI disclosure.

Step 4: Read the receipt

Open the evidence explorer. Every call, allowed or blocked, has one row: the pack, what each control decided, the rule that fired, and a hash that chains it to the previous row. The verifier checks the whole chain end to end.

The evidence stores hashes of prompts and responses, not the raw text. The conformity report in the admin area turns these rows into a document mapped to EU AI Act requirements.

What happens on every request

  1. The key is resolved to your account, its pack, its model list and its budget.
  2. Duplicate submissions collapse, and rate and budget limits are applied.
  3. The prompt is checked against the pack: personal data is redacted, forbidden requests are blocked.
  4. The model answers, and the answer is checked again before it reaches your app.
  5. The decision is written to the evidence log, with usage counted in the same transaction.

Handling blocks and errors

A blocked request returns HTTP 403 in the OpenAI error shape, with the pack, the category and arequest_id you can look up in the evidence explorer. Show your user a clear refusal, never the raw message.

Blocked request

HTTP/1.1 403 Forbidden

{
  "error": {
    "message": "Input blocked by guardrail policy: Classified as 'violence'",
    "type": "policy_violation",
    "code": "input_guardrail_blocked",
    "policy_pack": "kids",
    "violation_category": "violence",
    "request_id": "req_7d8f3c9e"
  }
}
codestatusmeaningwhat to do
invalid_api_key401Missing or invalid Bearer tokenCheck the key and the Authorization header
model_not_found400The model is not allowed for this keyCall GET /v1/models to list the models your key may use
input_guardrail_blocked403The prompt violates the key's policy packShow the user a refusal; log the request_id
output_guardrail_blocked403The model's answer violates the policy packShow a fallback message; log the request_id
quota_exceeded429The key's budget for the period is spentRaise the budget in the portal or wait for retry_after
rate_limit_exceeded429Too many requests per minute for this keyBack off and retry after the Retry-After header
upstream_error502The model provider returned an errorRetry with backoff

Latency

What each control costs per request. The cost class is known today; the times are filled in from a benchmark run, and until then each cell says so.

Gate benchmark

What the gate costs, once it is measured

A gate that adds a second to every request is a gate nobody runs. Before Gateboard publishes a single number, each control below carries a placeholder. Every “to measure” cell stands empty until a real benchmark run fills it, never an estimate.

Verification time and block rate per gate control, pending measurement.
controlcost classverification timeblock rate
set_rls_contextcounters (This step adds no meaningful work: counters and context, no model call.)to measuren/a
idempotencycounters (This step adds no meaningful work: counters and context, no model call.)to measuren/a
rate_limitregex (Cheap checks: regex and counters, no model call.)to measureto measure
budget_enforcementcounters (This step adds no meaningful work: counters and context, no model call.)to measureto measure
model_validationcounters (This step adds no meaningful work: counters and context, no model call.)to measureto measure
guardrail_premodel check (A model call runs at this step; this is the real cost of deep enforcement.)to measureto measure
guardrail_postmodel check (A model call runs at this step; this is the real cost of deep enforcement.)to measureto measure
evidence_logcounters (This step adds no meaningful work: counters and context, no model call.)to measuren/a

No figure above comes from a measurement. The cost classes are real (counters and context are free, regex is cheap, a model call is the real cost); the times and block rates are marked “to measure” and will be filled by a benchmark run before launch.

Troubleshooting

I get 401 invalid_api_key

The key is missing, mistyped, expired or disabled. Send it as Authorization: Bearer <key>, and check its status on the Keys page.

I get 400 model_not_found

Each key may call a fixed list of models. Call GET /v1/models with the same key to see the list, then use one of those names.

The answer has no notice and nothing was redacted

Check which pack the key enforces on the Keys page. Notices and redactions depend on the pack: kids and patients redact names and phone numbers, banking redacts account and card numbers.

The receipt does not appear in the evidence explorer

Make sure you are signed in to the same account that owns the key. Every call, allowed or blocked, writes one evidence row; if none appears, send the request_id to support.

What to do next

  • Try prompts in the playground to see each pack before you ship.
  • Set a monthly budget per key on the Keys page.
  • Read the use cases to see which controls each sector relies on.
  • Generate the conformity report from the admin area once real traffic flows.