parezenparezenDocs
Get free X-ray

Documentation

DocsThe stackQuickstartRun the auditHosted gatewaySelf-hostingCloud platformsSDKs and frameworksFail-open patternLever guideHow savings are verifiedData handlingAPI referencePR cost check setup
Docs/Hosted gateway

Hosted gateway

Base URL, pz_ keys, policies, budgets and errors.

Address and keys

Planned. Hosted base URL, once it exists: https://api.parezen.com/v1. The design is a project, then a pz_ key that carries the project and the environment. Adding a provider key in the dashboard is a preview, and this site does not accept a production key. Parezen is designed not to mark up the token price. Token counts from a provider usage field are not read, because no provider is called. Replay and switching would use only providers you have connected and left enabled. That path is not running. The gateway is not deployed. This repository does not call a model provider, does not read provider usage fields, does not terminate TLS, does not encrypt stored keys and does not rate-limit requests.

Node
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.parezen.com/v1",
  apiKey: process.env.PAREZEN_API_KEY, // pz_ key. Project and environment come from this key.
  defaultHeaders: {
    "X-Parezen-Route": "support-reply",
    "X-Parezen-Task": "ticket_resolved",
  },
});

await client.chat.completions.create({
  model: "anthropic/claude-sonnet-4.5",
  messages: [{ role: "user", content: "Summarise the latest customer ticket." }],
});
Python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.parezen.com/v1",
    api_key=os.environ["PAREZEN_API_KEY"],  # pz_ key. Project and environment come from this key.
)
client.chat.completions.create(
    model="anthropic/claude-sonnet-4.5",
    messages=[{"role": "user", "content": "Summarise the latest customer ticket."}],
    extra_headers={
        "X-Parezen-Route": "support-reply",
        "X-Parezen-Task": "ticket_resolved",
    },
)

Optional per-request headers

Optional per-request headers
// Optional per-request headers. The client still uses PAREZEN_API_KEY.
await client.chat.completions.create(
  {
    model: "anthropic/claude-sonnet-4.5",
    messages: [{ role: "user", content: "Summarise the latest customer ticket." }],
  },
  {
    headers: {
      "X-Parezen-Trace": "trace_example",
      "X-Parezen-Cache": "off",
    },
  },
);
Optional per-request headers
# Optional per-request headers. The client still uses PAREZEN_API_KEY.
client.chat.completions.create(
    model="anthropic/claude-sonnet-4.5",
    messages=[{"role": "user", "content": "Summarise the latest customer ticket."}],
    extra_headers={
        "X-Parezen-Trace": "trace_example",
        "X-Parezen-Cache": "off",
    },
)

Default samples send X-Parezen-Route and X-Parezen-Task with defaultHeaders in Node or extra_headers in Python. Project and environment come from the pz_ key, not a header. Optional per-request headers are X-Parezen-Trace and X-Parezen-Cache: off. Self-hosted default is http://localhost:3002/v1. No-SDK snippets only work for apps already on the OpenAI format.

To skip the response cache once, send X-Parezen-Cache: off.

Policies and budgets

Planned. A policy is per route: cost, latency and quality. Budgets are designed to sit on a key, a project, and later an agent. A soft limit would notify. A hard limit would stop that key. Shadow tests are designed to run before a quality-affecting switch. None of this is deployed.

Errors

  • Planned. 401 would mean the pz_ key is missing or revoked.
  • Planned. 429 would mean a rate limit on that key. Rate limiting is not built.
  • A budget hard stop is designed as a 4xx. Your app must not fail open around it. Billing is designed never to return an error on production traffic.
  • 5xx or a connection error would mean Parezen did not serve the call. Fail-open is allowed there in the design.
On this page
  • Address and keys
  • Policies and budgets
  • Errors