OpenAI-compatible integration
Use your Varion API key as the client API key and replace the OpenAI base URL.
Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_VARION_KEY",
base_url="https://api.varion.tech/v1",
)
response = client.chat.completions.create(
model="gpt-5-mini",
messages=[{"role":"user","content":"Hello"}],
)Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_VARION_KEY",
baseURL: "https://api.varion.tech/v1",
});Supported endpoints
| Endpoint | Status |
|---|---|
POST /v1/chat/completions | Supported |
POST /v1/responses | Supported |
GET /v1/models | Supported |
Optional headers
X-Varion-Optimize: off X-Varion-Cache: off X-Upstream-API-Key: sk-...
Developer downloads
Python helper Node.js helper Postman collection
Local tests call Varion’s optimise-only endpoint for the exact optimized request. Provider keys stay on the customer’s computer and are sent only to the selected AI provider.
Verified paired benchmark
For publishable measurements, send the identical original request twice with the same benchmark ID. First send X-Varion-Benchmark-Phase: baseline, X-Varion-Optimize: off and X-Varion-Cache: off. Then send phase optimized. Read X-Varion-Verified-Saved-Tokens, X-Varion-Verified-Savings-Percent and X-Varion-Savings-Verified.
True passthrough always reports zero saved tokens. Estimated and verified savings are reporting metrics only. Billing is based on successful customer input tokens processed.