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

# 协议转换总览

> PipeLLM 网关上的 OpenAI、Anthropic、Gemini 三种请求格式转换路由

PipeLLM converter 的作用是让开发者保留现有 SDK 格式，同时去调用其他协议族的
模型。

## 什么时候该用 Converter

适合走 converter 路由的场景：

* 你的应用已经在使用 OpenAI、Anthropic 或 Gemini 格式
* 你想切换模型提供商，但不想重写请求和响应处理逻辑
* 当前原生公共路由不支持你想要的协议族

如果请求本身就已经匹配目标平台协议，优先走原生公共路由。详细规则请看
[路由与协议](/guides/routing-protocols.zh)。

## Converter 矩阵

| 请求格式         | Base URL                           | 主要端点                                     | 常见用途                                |
| ------------ | ---------------------------------- | ---------------------------------------- | ----------------------------------- |
| OpenAI 格式    | `https://api.pipellm.ai/openai/v1` | `/chat/completions`                      | 保留 OpenAI SDK，调用 Claude 或 Gemini 模型 |
| Anthropic 格式 | `https://api.pipellm.ai/anthropic` | `/v1/messages`                           | 保留 Anthropic SDK，调用 GPT 或 Gemini 模型 |
| Gemini 格式    | `https://api.pipellm.ai/gemini`    | `/v1beta/models/{model}:generateContent` | 保留 Gemini SDK，调用 GPT 或 Claude 模型    |

## 当前限制

OpenAI Responses 的 converter 路由目前还没有开放。如果你的应用现在使用的是
OpenAI Responses API，并且需要跨协议调用，请先改走 OpenAI Chat Completions
converter：
`https://api.pipellm.ai/openai/v1/chat/completions`

## 选择格式

<Columns cols={3}>
  <Card title="OpenAI 格式" icon="bolt" href="/converter/openai-format.zh">
    用 OpenAI SDK 格式调用 Anthropic 或 Gemini 模型
  </Card>

  <Card title="Anthropic 格式" icon="message" href="/converter/anthropic-format.zh">
    用 Anthropic SDK 格式调用 OpenAI 或 Gemini 模型
  </Card>

  <Card title="Gemini 格式" icon="sparkles" href="/converter/gemini-format.zh">
    用 Gemini SDK 格式调用 OpenAI 或 Anthropic 模型
  </Card>
</Columns>
