Skip to main content
Menu
Get started / Quickstart
Get started

Quickstart

Send your first sealed request and verify its receipt. It takes about five minutes, and the code you already have for OpenAI keeps working.

5 minute readUpdated 13 November 2026Python · TypeScript · curl
Before you start
You need a Panward account, an API key, and Python 3.9+ or Node 18+ (or just curl). Create an account if you don't have one.

Install a client#

Panward speaks the OpenAI API, so the official OpenAI SDK works as it is. There is no Panward SDK yet (the list of what is not available says so), and curl needs nothing installed.

pip install openai

Create and store an API key#

  1. Open Console → API keys and choose Create key.
  2. Pick the project the key belongs to. The project's policies (region, sealed only, spend limits) apply to every request made with it.
  3. Copy the key. It's shown once.
Terminal
export PANWARD_API_KEY="pw_live_…"
Keep keys in your secret manager or environment, never in source control or client-side code. If a key leaks, revoke it: revocation takes effect in every region within 30 seconds.

Send your first request#

Point the client at https://api.panward.ai/v1 and pick a model. This example uses z-ai/glm-5.3, a model the API reference's examples show in the Sealed tier. Tiers and models explains what Sealed and Routed mean, and the model catalog lists what you can use.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.panward.ai/v1",
    api_key=os.environ["PANWARD_API_KEY"],
)

raw = client.chat.completions.with_raw_response.create(
    model="z-ai/glm-5.3",
    messages=[{"role": "user", "content": "Summarise this discharge note."}],
)
reply = raw.parse()
receipt_id = raw.headers["panward-receipt-id"]

print(reply.choices[0].message.content)
print(receipt_id)  # rcpt_01JC7Q4N9W3XK2H8ZP5T6V7B8M

Read the receipt#

Every response, streamed or not, carries the id of its receipt in the panward-receipt-id header. The receipt holds hashes and decisions, never your prompt or the output.

Response headers
HTTP/2 200
content-type: application/json
panward-request-id: req_01JC7Q4N8G5T2R9X1M3K6P7W4D
panward-receipt-id: rcpt_01JC7Q4N9W3XK2H8ZP5T6V7B8M
panward-tier: sealed
panward-region: eu
panward-model: z-ai/glm-5.3
HeaderWhat it tells you
panward-receipt-idThe receipt id. Fetch the receipt with GET /v1/receipts/{id}.
panward-tiersealed or routed: the tier that served the request.
panward-regioneu: the region that served it.
panward-modelThe model that answered. It differs from the one you asked for only when you allowed fallback.
panward-request-idQuote it when you write to support.

The receipt is pending when the response ends and usually final within a second. Fetch it with your key:

Terminal
curl https://api.panward.ai/v1/receipts/rcpt_01JC7Q4N9W3XK2H8ZP5T6V7B8M \
  -H "Authorization: Bearer $PANWARD_API_KEY"

The level the gateway states for the upstream hop is in the upstream.verified event. What each level shows, and what it does not.

The upstream.verified event of a final receipt
{
  "type": "upstream.verified",
  "result": "verified",
  "level": "sealed_attested_path",
  "evidence": [
    {
      "id": "sha256:0b9a8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a",
      "kind": "gateway_enclave",
      "hardware": "intel-tdx",
      "firmware_status": "up_to_date",
      "nonce_bound": true
    },
    {
      "id": "sha256:5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d",
      "kind": "model_environment",
      "hardware": "intel-tdx",
      "operator_rating": "B",
      "nonce_bound": true
    }
  ],
  "response_proof": {
    "kind": "enclave_signature",
    "signer_scope": "gateway_enclave",
    "verified_at": 1790000002
  },
  "claims": {
    "gpu_attested": "asserted",
    "debug_mode": "refuted",
    "weights_provenance": "unknown"
  }
}

Verify it yourself#

Verifying it yourself means checking Panward's gateway and what it states. Warden is the open-source verifier. It checks that the gateway is the published software running in a genuine enclave, that the receipt was signed by that gateway, and that the bytes you hold match the receipt. What the gateway says it verified about the upstream is shown as the gateway's statement, not as something Warden checked.

Keep the exact request body you send and the exact response bytes you receive: the receipt holds their hashes. Fetching a receipt by id needs your key in PANWARD_API_KEY.

Terminal
cat > request.json <<'EOF'
{"model": "z-ai/glm-5.3", "messages": [{"role": "user", "content": "Summarise this discharge note."}]}
EOF

curl https://api.panward.ai/v1/chat/completions \
  -D headers.txt -o response.bin \
  -H "Authorization: Bearer $PANWARD_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @request.json
$ warden verify rcpt_01JC7Q4N9W3XK2H8ZP5T6V7B8M --request request.json --response response.bin
Terminal (abridged)
$ warden verify rcpt_01JC7Q4N9W3XK2H8ZP5T6V7B8M --request request.json --response response.bin
Gateway signature valid. Request and response bytes match the receipt.
  1. Gateway identity   pass
  2. Published software pass
  3. Receipt signature  pass
  4. Your bytes         pass
  5. Stated result      pass
  6. TLS binding        pass
verdict: verified

Verify offline with Warden

Warden sends no prompt or response content anywhere: your bytes are hashed on your machine. With the attestation document, its collateral and the release file saved, it makes no network call at all. The command line page lists the commands, flags, verdicts and exit codes. Warden is built from the open-source gateway repository today.

Checking a receipt shows

  • The receipt was signed by Panward's gateway, running software whose measurements are on the published release list, in an enclave whose attestation Warden checked (steps 1 to 3).
  • When you supply them, the request and response bytes you hold are the ones the gateway received and wrote (step 4).
  • What the gateway states it verified about the upstream: the level, the signer scope and the evidence it relied on, named by content hash. This part is the gateway's statement. Warden reports it and does not check it against the upstream.

It does not show

  • That the answer is correct. Models still make mistakes.
  • What your own application does with the response afterwards.
  • It does not establish which instance served the request, whether the GPU was in a protected state, or where the model's weights came from.
  • Protection against someone with physical access to the hardware. Attestation protects against software and administrators. It cannot rule out someone with physical access to the hardware.
  • Anything about confidentiality at the upstream for a Routed request: the upstream provider can read the prompt.

Require sealed models#

To make sure a request is never served by a Routed offer, send panward-tier: sealed. With no eligible Sealed offer the answer is 503 sealed_unavailable; the request is never downgraded. You can also set Sealed only for a whole project in Policies: a request for routed then returns 403 policy_blocked.

curl https://api.panward.ai/v1/chat/completions \
  -H "Authorization: Bearer $PANWARD_API_KEY" \
  -H "Content-Type: application/json" \
  -H "panward-tier: sealed" \
  -d '{
    "model": "z-ai/glm-5.3",
    "messages": [{"role": "user", "content": "Summarise this discharge note."}]
  }'
403 when the project's policy allows Sealed models only and the model is Routed
{
  "error": {
    "type": "policy_blocked",
    "message": "This project's policy allows Sealed models only, and 'acme/atlas-2' is offered in the Routed tier.",
    "param": "model",
    "request_id": "req_01JC7Q6D4H9K2M5P8R1T3V6X7Z",
    "doc_url": "https://panward.ai/docs/errors#policy_blocked"
  }
}

Next steps#

Was this page helpful?Suggest an edit