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

# Other Integrations

> Connect any OpenAI-compatible tool or framework to Routeway.

Routeway exposes a standard **OpenAI-compatible API**, which means any application, SDK, or framework that lets you configure a custom base URL and API key can connect to Routeway with no code changes.

<Note>
  All integrations require a valid Routeway API key. Get yours from the [dashboard](https://routeway.ai/dashboard/api-keys).
</Note>

***

## Generic Connection Details

| Setting                         | Value                                   |
| ------------------------------- | --------------------------------------- |
| Base URL (OpenAI-compatible)    | `https://api.routeway.ai/v1`            |
| Base URL (Anthropic-compatible) | `https://api.routeway.ai`               |
| Auth header                     | `Authorization: Bearer YOUR_API_KEY`    |
| Models endpoint                 | `GET https://api.routeway.ai/v1/models` |

***

## How to Connect Any Tool

If your tool asks for an "OpenAI API key" and "base URL", you just need two values:

<Steps>
  <Step title="Set the base URL">
    Replace the default OpenAI URL with:

    ```
    https://api.routeway.ai/v1
    ```
  </Step>

  <Step title="Enter your Routeway API key">
    Use your Routeway API key wherever the tool asks for an "OpenAI API key" or "API token".
  </Step>

  <Step title="Pick a model">
    Enter a model ID from [routeway.ai/models](https://routeway.ai/models). If the tool has a "fetch models" button, click it to load the full list automatically.
  </Step>
</Steps>

***

## SDK Examples

Drop-in replacement for the OpenAI SDK in any language:

<CodeGroup>
  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="YOUR_ROUTEWAY_API_KEY",
      base_url="https://api.routeway.ai/v1"
  )

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

  ```javascript JavaScript / TypeScript theme={null}
  import OpenAI from 'openai';

  const client = new OpenAI({
    apiKey: 'YOUR_ROUTEWAY_API_KEY',
    baseURL: 'https://api.routeway.ai/v1',
  });

  const response = await client.chat.completions.create({
    model: 'gpt-4.1',
    messages: [{ role: 'user', content: 'Hello!' }],
  });
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.routeway.ai/v1/chat/completions" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_ROUTEWAY_API_KEY" \
    -d '{
      "model": "gpt-4.1",
      "messages": [{"role": "user", "content": "Hello!"}]
    }'
  ```
</CodeGroup>

***

## Common Tools That Work Out of the Box

Any of these tools can be pointed at Routeway by changing the base URL:

| Tool / Framework       | Where to set the base URL                                 |
| ---------------------- | --------------------------------------------------------- |
| **LangChain**          | `ChatOpenAI(base_url="https://api.routeway.ai/v1")`       |
| **LlamaIndex**         | `OpenAI(api_base="https://api.routeway.ai/v1")`           |
| **Vercel AI SDK**      | `createOpenAI({ baseURL: "https://api.routeway.ai/v1" })` |
| **AutoGen**            | Set `base_url` in the OAI config list                     |
| **CrewAI**             | Use the OpenAI-compatible LLM config                      |
| **Continue (VS Code)** | Set `apiBase` in `config.json`                            |
| **Cursor**             | Settings → Models → OpenAI API Base                       |
| **LibreChat**          | Set the endpoint URL in admin config                      |
| **TypingMind**         | Custom API Endpoint field                                 |
| **BoltAI**             | Custom provider → API Base URL                            |

<Info>
  If a tool supports "OpenAI-compatible" or "custom endpoint" configuration, it will work with Routeway. Just set the base URL and API key.
</Info>

***

## Anthropic-Compatible Tools

Some tools (like Claude Code) use the Anthropic Messages API instead of OpenAI's format. For those, use:

| Setting    | Value                     |
| ---------- | ------------------------- |
| Base URL   | `https://api.routeway.ai` |
| Auth token | Your Routeway API key     |
| Endpoint   | `/v1/messages`            |

See the [Claude Code integration](/integrations/agents/claude-code) for a full example.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="401 Unauthorized">
    Double-check that your API key is correct and has available balance (for paid models). Create a new key from the [dashboard](https://routeway.ai/dashboard/api-keys) if needed.
  </Accordion>

  <Accordion title="Model not found">
    Verify the model ID matches exactly. Use the [models endpoint](https://api.routeway.ai/v1/models) or browse [routeway.ai/models](https://routeway.ai/models) to see available models.
  </Accordion>

  <Accordion title="Connection refused or timeout">
    Ensure you're using `https://api.routeway.ai/v1` (with HTTPS and `/v1`). Some tools require the trailing `/v1`, others don't — try both if you get errors.
  </Accordion>

  <Accordion title="Tool doesn't have a base URL field">
    Check if the tool supports environment variables like `OPENAI_BASE_URL` or `OPENAI_API_BASE`. Many tools read these as fallbacks.
  </Accordion>
</AccordionGroup>
