---
title: "Change one base_url. Ship every model."
description: "Native OpenAI, Anthropic and Gemini protocol support: keep the official SDKs you already use, change one base_url, and every model in the catalog is yours."
canonical: https://pirouter.ai/sdk
last-updated: 2026-10-14
---

# Change one base_url. Ship every model.

> Native OpenAI, Anthropic and Gemini protocol support: keep the official SDKs you already use, change one base_url, and every model in the catalog is yours.

pirouter speaks the OpenAI, Anthropic and Gemini protocols natively — the official SDKs, and every framework built on them, work out of the box. No wrapper library to learn, nothing new to install.

## Your stack already supports us

Point the client at our endpoint and pass any model slug from the catalog. That is the whole migration.

### curl

```bash
curl https://api.pirouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $PIROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-opus-5.5",
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'
```

### Python — official OpenAI SDK

```python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.pirouter.ai/v1",
    api_key="<PIROUTER_API_KEY>",
)

completion = client.chat.completions.create(
    model="anthropic/claude-opus-5.5",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(completion.choices[0].message.content)
```

### TypeScript — official OpenAI SDK

```typescript
import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://api.pirouter.ai/v1',
  apiKey: process.env.PIROUTER_API_KEY,
})

const completion = await client.chat.completions.create({
  model: 'anthropic/claude-opus-5.5',
  messages: [{ role: 'user', content: 'Hello!' }],
})
console.log(completion.choices[0].message.content)
```

Go deeper in the docs:

- [Quickstart](https://pirouter.ai/docs/quickstart)
- [Integrations](https://pirouter.ai/docs/integrations)
- [API reference](https://pirouter.ai/docs/api)

## Works with the whole ecosystem

If it speaks any of the three protocols — frameworks, agents, IDE tools — it can talk to pirouter.

### [OpenAI SDK](https://github.com/openai/openai-python)

Python, TypeScript, .NET, Java — set base_url and api_key, done.

### [Anthropic SDK](https://github.com/anthropics/anthropic-sdk-python)

Native protocol forwarding — point the official SDK at our endpoint and it just works.

### [Gemini SDK](https://github.com/googleapis/python-genai)

The official Google GenAI SDK works unchanged over our native Gemini protocol support.

### [Vercel AI SDK](https://github.com/vercel/ai)

Plug in via createOpenAI({ baseURL }) and stream straight into your UI.

### [pi agent](https://github.com/earendil-works/pi)

The open-source coding agent — point its model provider at our endpoint and go.

### [Any HTTP client](https://pirouter.ai/sdk#example-curl)

It is just HTTPS and JSON. If it can POST, it can route.

## Five minutes to your first response

Grab an API key, keep your SDK, and route your next request through pirouter.

---

HTML version: https://pirouter.ai/sdk · Machine-readable index: https://pirouter.ai/llms.txt
