SDKs and frameworks
Node, Python, LangChain and LlamaIndex. The CLI is labelled later.
OpenAI SDK
Planned. Node (openai on npm) and Python (openai on pip) are the intended path, by changing baseURL and apiKey. They do not reach a Parezen gateway today. Apps that call the Anthropic or Google SDKs directly would need to speak the OpenAI format, unless a native endpoint is added later. That native endpoint is not scheduled. There is no Parezen SDK.
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." }],
});
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. 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. 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.
LangChain and LlamaIndex
Planned examples. Both can use an OpenAI-compatible client. The snippets pass the same base URL, a pz_ key, and the same headers. They are examples of that pattern, not a pinned framework release and not a tested integration.
import { ChatOpenAI } from "@langchain/openai";
const model = new ChatOpenAI({
model: "anthropic/claude-sonnet-4.5",
apiKey: process.env.PAREZEN_API_KEY,
configuration: {
baseURL: "https://api.parezen.com/v1",
defaultHeaders: {
"X-Parezen-Route": "support-reply",
"X-Parezen-Task": "ticket_resolved",
},
},
});
// Optional per-request headers. The ChatOpenAI client still uses PAREZEN_API_KEY.
await model.invoke("Summarise the latest customer ticket.", {
options: {
headers: {
"X-Parezen-Trace": "trace_example",
"X-Parezen-Cache": "off",
},
},
});
import os
from llama_index.llms.openai import OpenAI
llm = OpenAI(
model="anthropic/claude-sonnet-4.5",
api_base="https://api.parezen.com/v1",
api_key=os.environ["PAREZEN_API_KEY"],
additional_kwargs={
"extra_headers": {
"X-Parezen-Route": "support-reply",
"X-Parezen-Task": "ticket_resolved",
},
},
)
# 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",
},
)
Later
The Parezen CLI and @parezen/sdk are labelled later. They are not required, and section 9 of the plan does not schedule them.