Chat Completions
Use POST /v1/chat/completions with streaming and tool calls.
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.
Base URL https://api.varion.tech/v1 Varion authentication Authorization: Bearer varion_... Provider authentication X-Upstream-API-Key: sk-...
Varion optimises supported request payloads before forwarding them to the configured OpenAI-compatible provider.
Use POST /v1/chat/completions with streaming and tool calls.
Use POST /v1/responses for supported request structures.
Use GET /v1/models with the configured provider.
Read original, provider-bound, avoided-token and verification headers.
The provider credential passes through Varion only for forwarding and is excluded from normal request logs.
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"
},
)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 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"}]}'System and developer instructions are preserved. Structured outputs, code-heavy prompts and sensitive workflows receive conservative treatment or safe passthrough.
Local testers send the provider credential directly to OpenAI. Varion receives only the optimisation request and any metrics the customer explicitly uploads.
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.
Start with 100,000 trial input tokens.
Create free account