> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crazyrouter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Production-revalidated starter paths for connecting to Crazyrouter from OpenAI, Anthropic, and Gemini

> Last updated: 2026-06-23

# Getting Started

This page only documents starter paths that were revalidated against Crazyrouter production on `2026-03-23`.

For the fastest start, separate the integration styles first:

* OpenAI-compatible: `https://api.crazyrouter.com/v1`
* Anthropic native: `https://api.crazyrouter.com`
* Gemini native: `https://api.crazyrouter.com/v1beta/models/...`

## Shortest migration rule

When migrating from an OpenAI-compatible client, you usually only change two things:

1. set `base_url` to `https://api.crazyrouter.com/v1`
2. replace the key with your Crazyrouter `sk-xxx`

***

## Migrating from OpenAI

```python theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="sk-xxx",
    base_url="https://api.crazyrouter.com/v1"
)

response = client.chat.completions.create(
    model="gpt-5.5",
    messages=[{"role": "user", "content": "Hello"}],
    max_tokens=64
)
```

This production recheck confirmed that:

* `gpt-5.5` works through `/v1/chat/completions`
* if you need reasoning summaries or OpenAI-style web search, you should prefer `/v1/responses`

Related pages:

* [Responses API Overview](/en/chat/responses/overview)
* [GPT-5 Thinking Mode](/en/chat/responses/gpt5-thinking)

***

## Migrating from Anthropic

### Option A: stay on the OpenAI-compatible layer

```python theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="sk-xxx",
    base_url="https://api.crazyrouter.com/v1"
)

response = client.chat.completions.create(
    model="claude-opus-4-8",
    messages=[{"role": "user", "content": "Hello"}],
    max_tokens=64
)
```

### Option B: use native Anthropic Messages

```python theme={null}
import anthropic

client = anthropic.Anthropic(
    api_key="sk-xxx",
    base_url="https://api.crazyrouter.com"
)

response = client.messages.create(
    model="claude-opus-4-8",
    max_tokens=128,
    messages=[{"role": "user", "content": "Hello"}]
)
```

If you need:

* standard Claude chat: prefer `claude-opus-4-8`
* an explicit thinking block: prefer `claude-opus-4-8`

Related page:

* [Claude Native Format](/en/chat/anthropic/messages)

***

## Migrating from Gemini

### Option A: OpenAI-compatible layer

```python theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="sk-xxx",
    base_url="https://api.crazyrouter.com/v1"
)

response = client.chat.completions.create(
    model="gemini-3.1-pro",
    messages=[{"role": "user", "content": "Hello"}],
    max_tokens=64
)
```

### Option B: Gemini native

```bash theme={null}
curl "https://api.crazyrouter.com/v1beta/models/gemini-3.1-pro:generateContent?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [
          {"text": "Hello"}
        ]
      }
    ]
  }'
```

If you need:

* simple reuse of existing OpenAI SDK code: start with the compatibility layer
* structured outputs, Google Search, or thinking: prefer Gemini native

Related pages:

* [Gemini OpenAI-Compatible Format](/en/chat/gemini/openai-compat)
* [Gemini Native Format](/en/chat/gemini/native)

***

## Environment variables

If you use the OpenAI-compatible route, a good default is:

<Tabs>
  <Tab title="Linux / macOS">
    ```bash theme={null}
    export OPENAI_API_KEY=sk-xxx
    export OPENAI_BASE_URL=https://api.crazyrouter.com/v1
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    $env:OPENAI_API_KEY = "sk-xxx"
    $env:OPENAI_BASE_URL = "https://api.crazyrouter.com/v1"
    ```
  </Tab>
</Tabs>

Then your code can be:

```python theme={null}
from openai import OpenAI
client = OpenAI()
```

***

## Starter recommendations

| Goal                                                  | Recommended starting path                             |
| ----------------------------------------------------- | ----------------------------------------------------- |
| Fastest GPT integration                               | OpenAI-compatible + `gpt-5.5`                         |
| Fastest Claude integration                            | Anthropic native + `claude-opus-4-8`                  |
| Fastest Gemini integration                            | OpenAI-compatible or Gemini native + `gemini-3.1-pro` |
| Need reasoning summaries                              | Responses API                                         |
| Need a Claude thinking block                          | `claude-opus-4-8`                                     |
| Need Gemini Google Search / thinking / responseSchema | Gemini native                                         |

<Note>
  Crazyrouter supports OpenAI, Anthropic, and Gemini protocols at the same time. In practice, the more reliable approach is usually not forcing every model through one protocol, but choosing the route that best matches the capability you need.
</Note>
