Migrate from another gateway
Move from a generic model gateway or router: model ids, provider preferences, unknown fields, keys and verification.
What usually differs#
- Model ids: Panward uses canonical
vendor/nameids and resolves no aliases. - Provider selection: Panward chooses the capacity. You choose the tier, the region and the fallback models; parameters that pick a provider are not accepted.
- Reasoning: send
reasoningand readreasoning_content. - Cost: responses carry token counts and no cost. Read spend from the usage API or the console.
- Headers: Panward's own headers start with
panward-(Tiers and routing headers).
Map provider preferences to Panward controls#
| What you asked the gateway for | What you do on Panward |
|---|---|
| A private or enclave provider only | panward-tier: sealed per request, or Sealed only for the project (Policies) |
| Allow fallbacks | panward-fallback: allow with the project's list of fallback models (panward-fallback) |
| A data region | The regional host and the policy's allowed regions (Keep data in your region) |
| Sorting by price or latency | Not exposed: Panward chooses among eligible offers. |
Tier and fallback are headers; the body holds only OpenAI fields and a canonical model id
curl https://api.eu.panward.ai/v1/chat/completions \ -H "Authorization: Bearer $PANWARD_API_KEY" \ -H "Content-Type: application/json" \ -H "panward-tier: sealed" \ -H "panward-fallback: allow" \ -d '{"model": "z-ai/glm-5.3", "messages": [{"role": "user", "content": "Hello"}]}'
import os from openai import OpenAI client = OpenAI( base_url="https://api.eu.panward.ai/v1", api_key=os.environ["PANWARD_API_KEY"], ) reply = client.chat.completions.create( model="z-ai/glm-5.3", messages=[{"role": "user", "content": "Hello"}], extra_headers={"panward-tier": "sealed", "panward-fallback": "allow"}, )
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.eu.panward.ai/v1", apiKey: process.env.PANWARD_API_KEY, }); const reply = await client.chat.completions.create( { model: "z-ai/glm-5.3", messages: [{ role: "user", content: "Hello" }] }, { headers: { "panward-tier": "sealed", "panward-fallback": "allow" } }, );
Unknown fields are refused#
A body field that is not part of the OpenAI-compatible request is refused with 400 invalid_request, and param names it. Remove fields that belong to your previous gateway before you switch.
Keys and limits#
Create one Panward key per service and environment, and recreate the limits and the IP allowlist each key had. The lowest limit among key, project and organization applies (Restrict a key).
Verification is new#
Every response has a signed receipt. Store the panward-receipt-id with your record, attest the gateway and verify receipts in your pipeline (Attest the gateway, Verify in CI).