OverviewOpenAI-compatible

Quickstart

Velrix gives your application one API surface for routed AI requests, model discovery, scoped keys, usage reporting, and provider fallback. Start with direct HTTP, or point an OpenAI-compatible SDK at the Velrix base URL.

Direct HTTP

Using the Velrix API

Send a standard request to the Velrix chat completions endpoint. This works from any language or runtime that can make HTTPS requests.

Shell
curl https://api.velrix.ai/v1/chat/completions \
  -H "Authorization: Bearer $VELRIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "messages": [
      {
        "role": "user",
        "content": "Summarize today\'s usage anomalies."
      }
    ]
  }'
TypeScript fetch
const response = await fetch("https://api.velrix.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.VELRIX_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "gpt-5.4",
    messages: [
      { role: "user", content: "Summarize today's usage anomalies." },
    ],
  }),
});

const completion = await response.json();
console.log(completion.choices[0].message.content);

Drop-in SDK

Using the OpenAI SDK

If your app already uses the OpenAI SDK, keep the same client shape and configure Velrix as the base URL.

TypeScript
import OpenAI from "openai";

const openai = new OpenAI({
  apiKey: process.env.VELRIX_API_KEY,
  baseURL: "https://api.velrix.ai/v1",
});

async function main() {
  const completion = await openai.chat.completions.create({
    model: "gpt-5.4",
    messages: [
      {
        role: "user",
        content: "Write a concise incident update.",
      },
    ],
  });

  console.log(completion.choices[0].message);
}

main();
Python
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["VELRIX_API_KEY"],
    base_url="https://api.velrix.ai/v1",
)

completion = client.chat.completions.create(
    model="gpt-5.4",
    messages=[
        {"role": "user", "content": "Write a concise incident update."}
    ],
)

print(completion.choices[0].message.content)

Frameworks

Using third-party SDKs

Most model SDKs and agent frameworks can use Velrix when they support custom OpenAI-compatible settings.

Base URL

Use this wherever the framework asks for an OpenAI base URL.

https://api.velrix.ai/v1

Authorization

Send the key as a standard bearer token.

Bearer $VELRIX_API_KEY

Model

Start with automatic routing, or choose a model ID from the catalog.

gpt-5.4

Operations

Routing controls

Velrix keeps routing controls close to the traffic path so production changes do not require redeploying every application.

Scoped access

Constrain keys by environment, quota, model, provider, and operational policy.

Provider fallback

Keep alternate providers visible and ordered so incidents do not require SDK changes.

Audit visibility

Trace request IDs through model choice, token counts, route status, and spend.