> ## 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.

# 协议转换总览

> Relay 上的 OpenAI Chat Completions、OpenAI Responses、Anthropic、Gemini 请求格式转换路由

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

## 什么时候该用 Converter

适合走 converter 路由的场景：

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

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

## Converter 矩阵

| 请求格式 | Base URL | 主要端点 | 常见用途 |
| - | - | - | - |
| OpenAI 格式 | `https://api.pipellm.ai/openai/v1` | `/chat/completions` | 保留 OpenAI SDK，调用 Claude 或 Gemini 模型 |
| OpenAI Responses 格式 | `https://api.pipellm.ai/responses/v1` | `/responses` | 保留 OpenAI SDK、Codex CLI 等 Responses 客户端，调用 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 模型 |

## 当前限制

* Responses converter 是无状态的部分兼容实现：不支持 `previous_response_id`、
  服务端存储、托管工具和结构化输出格式。详见
  [Responses 格式](/zh/converter/responses-format#不支持的功能)。
* Gemini 3 模型要求在函数调用上回放 thought signature。各格式对签名的保留程度
  不同，请查看所用格式页面中的 Gemini 3 说明。Gemini 3 的多步工具调用建议优先使用
  [Gemini 原生路由](/zh/api-reference/gemini/overview)或
  [Responses 格式](/zh/converter/responses-format#思考与签名)。

## 选择格式

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

  <Card title="Responses 格式" icon="sparkles" href="/zh/converter/responses-format">
    用 OpenAI Responses 客户端调用 Anthropic 或 Gemini 模型
  </Card>

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

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.