Gatekeeper quickstart
Use any OpenAI SDK with a model that runs inside hardware trusted execution environments, and check the deployment before your first prompt leaves the machine.
Confidential Router is an OpenAI-compatible API for open models served from attested confidential GPUs. Gatekeeper is a small local proxy: it fetches the endpoint's signed Deployment Evidence, verifies it, and only then forwards your request. If anything does not check out, it refuses with an HTTP 503 instead of sending data.
1. Install and start Gatekeeper
curl -fsSL https://github.com/Super-Protocol/confidential-router/releases/latest/download/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
gatekeeper init
gatekeeper endpoint add router --upstream https://api.router.superprotocol.com --listen 127.0.0.1:8787
gatekeeper endpoint trust add router --from-upstream
gatekeeper run
2. Point your client at it
Only the base URL changes. Router keys start with sk-tee-v1-; access is by invite on the Router page.
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:8787/v1", # local Gatekeeper
api_key="sk-tee-v1-...",
)
resp = client.chat.completions.create(
model="<model-id>", # from GET /v1/models
messages=[{"role": "user", "content": "Summarize this claim file: ..."}],
)
print(resp.choices[0].message.content)
Successful responses carry the header X-Gatekeeper-Verdict: allow.
3. What Gatekeeper checks
Before the first request and every five minutes after, six stages run in order:
| Stage | What it checks |
|---|---|
fetch | Downloads the evidence bundle from /.well-known/swarm-evidence |
cert-chain | The signing certificate chains correctly |
untrusted-root | The chain ends in the trusted Super Swarm root CA |
jws | The RS256 signature over the evidence is valid |
tls-fingerprint | The TLS certificate you actually connected to matches the one in the evidence |
policy | The evidence digest matches the one you pinned |
If the evidence digest changes (for example after a redeploy), Gatekeeper stops forwarding until you approve the new digest.
4. Handle a refusal
A failed check returns 503 with an OpenAI-shaped error object whose stage field names the failing step. Treat it as a security event, not a transient error.
import openai
try:
resp = client.chat.completions.create(model=MODEL, messages=msgs)
except openai.APIStatusError as e:
if e.status_code == 503:
# Gatekeeper refused: evidence changed or a check failed.
# Don't fall back to an unverified endpoint.
alert_oncall(e.response.json())
raise
tls-fingerprint fails by design: the certificate your machine sees is the proxy's, not the endpoint's. That is the check doing its job.Try it without installing
- Evidence Inspector — verify a live evidence bundle in your browser
- Evidence samples dataset — real bundles with field descriptions
- Models on Confidential Router