---
title: "Integrations"
description: "Most tools work with pirouter by changing three settings, base URL, API key and model ID, because pirouter speaks the OpenAI, Anthropic and Gemini protocols natively. Every SDK and tool listed was run against pirouter with a real key before it was published, except one page written from its vendor's documentation and marked as such."
canonical: "https://pirouter.ai/docs/integrations"
last-updated: "2026-11-19"
lang: "en"
source: "content/docs/en/integrations/index.mdx"
---

# Integrations

Most tools work with pirouter by changing three settings, base URL, API key and model ID, because pirouter speaks the OpenAI, Anthropic and Gemini protocols natively. Every SDK and tool listed was run against pirouter with a real key before it was published, except one page written from its vendor's documentation and marked as such.

A tool needs no plugin to work with pirouter: point its base URL at pirouter, give it a pirouter key and write the model ID correctly. Each tool below has a step-by-step page. All but one were run against a live key before they were published; the exception, Cursor, needs a paid plan we have not tested yet, so its page and card say it was written from Cursor's documentation.

## Connect in three steps

1. **Set the base URL**

   Pick the address for the protocol the tool speaks:

   - OpenAI: `https://api.pirouter.ai/v1`
   - Anthropic: `https://api.pirouter.ai`
   - Gemini: `https://api.pirouter.ai`

   These are the values for the three official SDKs: the OpenAI address includes `/v1`, the Anthropic and Gemini addresses carry no version segment because the SDK adds its own. For any other tool, its own page has the value to use.

2. **Send the API key**

   The key goes in the `Authorization: Bearer` header. When that header is empty, the gateway reads `x-api-key` instead, which is the header the Anthropic SDK sends. No key yet? The [quickstart](https://pirouter.ai/docs/quickstart.md) creates one.

   The Google GenAI SDK sends the key in `x-goog-api-key` by default. The gateway does not read that header, so add an `Authorization` header as well.

3. **Write the model ID**

   Write the full `vendor/model` ID, such as `openai/gpt-6.2-astra`. A registered alias works too; logs and billing record the full ID either way. See [Models & protocols](https://pirouter.ai/docs/models.md#model-ids).

## SDKs & frameworks

- [OpenAI SDK](https://pirouter.ai/docs/integrations/openai-sdk.md): Base URL `https://api.pirouter.ai/v1`. Chat Completions and Responses. Nothing else to change.
- [Anthropic SDK](https://pirouter.ai/docs/integrations/anthropic-sdk.md): Base URL `https://api.pirouter.ai`. No `/v1`: the SDK adds it.
- [Google GenAI SDK](https://pirouter.ai/docs/integrations/google-genai-sdk.md): Base URL `https://api.pirouter.ai`. Also add an `Authorization: Bearer` header.
- [Vercel AI SDK](https://pirouter.ai/docs/integrations/vercel-ai-sdk.md): Base URL `https://api.pirouter.ai/v1`. Through `createOpenAI` from `@ai-sdk/openai`.
- [Claude Code](https://pirouter.ai/docs/integrations/claude-code.md): Base URL `https://api.pirouter.ai`. Two environment variables. No `/v1`.
- [Codex](https://pirouter.ai/docs/integrations/codex.md): Base URL `https://api.pirouter.ai/v1`. A provider in `config.toml`, Responses API only.
- [OpenCode](https://pirouter.ai/docs/integrations/opencode.md): Base URL `https://api.pirouter.ai/v1`. One OpenAI-compatible provider covers Claude, GPT and Gemini.
- [Cline](https://pirouter.ai/docs/integrations/cline.md): Base URL `https://api.pirouter.ai/v1`. OpenAI Compatible provider, in the extension or the CLI.
- [Cursor](https://pirouter.ai/docs/integrations/cursor.md): Base URL `https://api.pirouter.ai/v1`. Override OpenAI Base URL, on a plan that allows your own key. Written from the vendor documentation, not yet verified with a live account.
- [Open WebUI](https://pirouter.ai/docs/integrations/open-webui.md): Base URL `https://api.pirouter.ai/v1`. An OpenAI connection, in Admin Settings or by environment variable.

## Which models each integration can use

The models a tool can use are the ones served on the endpoints that tool calls. pirouter does one protocol translation: OpenAI GPT text models are also served on the Anthropic protocol, so a tool that speaks only the Anthropic protocol can use GPT text models too. The table below has a row for each protocol a tool speaks, with the model families it can use. Image models serve no chat endpoint, so they are left out.

| Tool             | Protocol  | Model families                                                         |
| ---------------- | --------- | ---------------------------------------------------------------------- |
| OpenAI SDK       | OpenAI    | OpenAI, Anthropic, Google, ByteDance, DeepSeek, Z.ai, Moonshot AI, xAI |
| Anthropic SDK    | Anthropic | OpenAI, Anthropic, ByteDance, DeepSeek, Z.ai, Moonshot AI              |
| Google GenAI SDK | Gemini    | Google                                                                 |
| Vercel AI SDK    | OpenAI    | OpenAI, Anthropic, Google, ByteDance, DeepSeek, Z.ai, Moonshot AI, xAI |
| Claude Code      | Anthropic | OpenAI, Anthropic, ByteDance, DeepSeek, Z.ai, Moonshot AI              |
| Codex            | OpenAI    | OpenAI, Anthropic, Google, ByteDance, DeepSeek, Z.ai, Moonshot AI, xAI |
| OpenCode         | OpenAI    | OpenAI, Anthropic, Google, ByteDance, DeepSeek, Z.ai, Moonshot AI, xAI |
| Cline            | OpenAI    | OpenAI, Anthropic, Google, ByteDance, DeepSeek, Z.ai, Moonshot AI, xAI |
| Cursor           | OpenAI    | OpenAI, Anthropic, Google, ByteDance, DeepSeek, Z.ai, Moonshot AI, xAI |
| Open WebUI       | OpenAI    | OpenAI, Anthropic, Google, ByteDance, DeepSeek, Z.ai, Moonshot AI, xAI |

For the models themselves, see the protocol table in [Models & protocols](https://pirouter.ai/docs/models.md#which-protocols-each-model-accepts), or each model's page on the main site.

A request for a model over a protocol it does not accept, or on an endpoint it is not served on, returns `422` with the error code `validation_failed`, and the `message` lists the endpoints the model is served on. See [Protocol mismatch](https://pirouter.ai/docs/models.md#protocol-mismatch).

- [Browse all models](https://pirouter.ai/models): Each model's page shows the protocols it accepts.

> **Planned, not available yet:** More coding agents, editors and chat apps are added here one at a time, each after it has been installed and tested against a live key.
