Introduction

Quickstart

Get started with the AI Gateway in under 5 minutes.

Quickstart

Get started with the AI Gateway in under 5 minutes. Choose your preferred method:

1. cURL

The simplest way to test the gateway.

curl https://viprouter.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer *** \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [
      {"role": "user", "content": "Hello, world!"}
    ]
  }'

2. OpenAI Python SDK

Drop-in replacement for the OpenAI SDK.

from openai import OpenAI

client = OpenAI(
    base_url="https://viprouter.com/v1",
    api_key="your-api-key"
)

response = client.chat.completions.create(
    model="openai/gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello, world!"}]
)

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

3. OpenAI Node.js SDK

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://viprouter.com/v1",
  apiKey: "your-api-key",
});

const response = await client.chat.completions.create({
  model: "openai/gpt-4o-mini",
  messages: [{ role: "user", content: "Hello, world!" }],
});

console.log(response.choices[0].message.content);

Model Format

The gateway uses a provider/model format:

ProviderFormatExample
OpenAIopenai/model-nameopenai/gpt-4o
Anthropicanthropic/model-nameanthropic/claude-sonnet-4-20250514
Googlemodel-namegemini-2.5-pro
Bedrockbedrock/model-namebedrock/anthropic.claude-3

Next Steps