VARION FOR OPENAI

Reduce OpenAI input-token usage with one compatible gateway.

Keep your existing SDK and models. Change the base URL, authenticate with a Varion key and forward your OpenAI credential securely per request.

Up to 60% applies to eligible workloads. Results vary, and uncertain requests use the original input.

OpenAI + Varion
Base URL
https://api.varion.tech/v1

Varion authentication
Authorization: Bearer varion_...

Provider authentication
X-Upstream-API-Key: sk-...

Compatible with common OpenAI workflows

Varion optimises supported request payloads before forwarding them to the configured OpenAI-compatible provider.

Chat Completions

Use POST /v1/chat/completions with streaming and tool calls.

Responses API

Use POST /v1/responses for supported request structures.

Model listing

Use GET /v1/models with the configured provider.

Verified headers

Read original, provider-bound, avoided-token and verification headers.

Production setup

The provider credential passes through Varion only for forwarding and is excluded from normal request logs.

Python

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_VARION_KEY",
    base_url="https://api.varion.tech/v1",
    default_headers={
        "X-Upstream-API-Key": "YOUR_OPENAI_KEY"
    },
)

Node.js

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "YOUR_VARION_KEY",
  baseURL: "https://api.varion.tech/v1",
  defaultHeaders: {
    "X-Upstream-API-Key": "YOUR_OPENAI_KEY"
  }
});

cURL

curl https://api.varion.tech/v1/chat/completions \
  -H "Authorization: Bearer YOUR_VARION_KEY" \
  -H "X-Upstream-API-Key: YOUR_OPENAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'
QUALITY SAFEGUARDS

Optimise only when the request is eligible.

System and developer instructions are preserved. Structured outputs, code-heavy prompts and sensitive workflows receive conservative treatment or safe passthrough.

Preserves critical instructionsConservative tool pruningSafe passthrough on uncertaintyProvider-usage measurementFailed requests deduct zero tokens

Privacy and credential handling

Local testing

Local testers send the provider credential directly to OpenAI. Varion receives only the optimisation request and any metrics the customer explicitly uploads.

Production gateway

The OpenAI credential is transmitted securely through Varion for request forwarding. It is not saved in normal production logs or the customer dashboard.

Customers remain responsible for provider terms, data permissions and testing outputs before production use.

Test OpenAI traffic before switching production.

Start with 100,000 trial input tokens.

Create free account