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

# OpenAI Responses API Gateway：可用模型、定价与代码示例

> 通过 APIXO 接入 GPT 和 Qwen 模型，了解兼容 OpenAI Responses 的 HTTP 请求和 SDK 用法、流式响应以及标准 token 费率。

Use OpenAI Responses API 格式调用 GPT 和 Qwen 模型。配置 APIXO 基础 URL 和 API 密钥，然后选择精确的模型 ID。

> [!NOTE]
>
> GPT 的可用性和标准价格核实于 2026 年 11 月 18 日，Qwen 核实于同年 11 月 20 日。最新费率及账号适用价格见 [API 价目表](https://apixo.ai/pricing/api)。

> [!TIP]
>
> **选择您的集成方式：** [使用快速入门](#quickstart) 手动集成，或 [让 AI 自动实现](#let-an-ai-implement-it) 通过复制本页内容。

## 对比 GPT 和 Qwen 模型及其定价

| 模型 | 模型 ID | 推荐用于 | 输入令牌 | 输入 | 输出 | 缓存写入 | 缓存读取 | 节省比例 |
| - | - | - | -: | -: | -: | -: | -: | -: |
| GPT-6.2 Astra | `gpt-6.2-astra` | 复杂编码和专业工作 | — | \$4.8 | \$24 | \$6 | \$0.24 | 40% |
| GPT-6.2 Sol | `gpt-6.2-sol` | 日常编码和代理工作流 | — | \$1.2 | \$6 | \$1.5 | \$0.06 | 40% |
| GPT-6.1 Sol | `gpt-6.1-sol` | 各模型的 Responses API 接入方式 | — | \$1.2 | \$6 | \$1.5 | \$0.06 | 40% |
| GPT-6.1 Terra | `gpt-6.1-terra` | 各模型的 Responses API 接入方式 | — | \$0.6 | \$3 | \$0.75 | \$0.03 | 40% |
| GPT-6 Astra | `gpt-6-astra` | 各模型的 Responses API 接入方式 | — | \$6 | \$30 | \$7.5 | \$0.6 | 40% |
| GPT-6 Sol | `gpt-6-sol` | 各模型的 Responses API 接入方式 | — | \$1.2 | \$6 | \$1.5 | \$0.12 | 40% |
| GPT-5.6 Sol | `gpt-5.6-sol` | 对 GPT-5.6 的高强度编码和专业工作负载要求最高 | — | \$3 | \$18 | \$3.75 | \$0.3 | 40% |
| GPT-5.6 Terra | `gpt-5.6-terra` | GPT-5.6 在日常专业工作中的能力与成本平衡 | — | \$1.2 | \$7.2 | \$1.5 | \$0.12 | 40% |
| GPT-5.6 Luna | `gpt-5.6-luna` | 适用于常规任务和高吞吐量工作负载的经济高效 GPT-5.6 选项 | — | \$0.12 | \$0.72 | \$0.15 | \$0.012 | 40% |
| GPT-5.5 | `gpt-5.5` | 最复杂的编码和专业工作 | — | \$3 | \$18 | \$0.3 | \$0.3 | 40% |
| GPT-5.4 | `gpt-5.4` | 复杂的专业工作，成本低于 GPT-5.5 | — | \$1.5 | \$9 | \$0.15 | \$0 | 40% |
| GPT-5.4 Mini | `gpt-5.4-mini` | 大量编码、计算机使用和子代理工作负载 | — | \$0.45 | \$2.7 | \$0.045 | \$0 | 40% |
| GPT-5 Mini | `gpt-5-mini` | 定义明确、成本敏感、低延迟、大批量的任务 | — | \$0.15 | \$1.2 | \$0.015 | \$0 | 40% |
| Qwen 4 Max | `qwen4-max` | 通用响应集成 | — | \$1.500 | \$4.500 | \$1.875 | \$0.075 | 0% |
| Qwen 3.8 Max | `qwen3.8-max` | 针对 Qwen 3.8 Max 的集成 | — | \$2.000 | \$6.000 | \$2.500 | \$0.250 | 0% |
| Qwen 3.8 Flash | `qwen3.8-flash` | 统一费率的成本敏感请求 | — | \$0.150 | \$0.470 | \$0.200 | \$0.016 | 0% |
| Qwen 3.7 Plus | `qwen3.7-plus` | 输入不超过 262,144 个 token 时的基础费率 | 1–262,144 | \$0.400 | \$1.600 | \$0.500 | \$0.080 | 0% |
| Qwen 3.7 Plus | `qwen3.7-plus` | 输入不超过 262,144 个 token 时的基础费率 | 262,145–1,000,000 | \$1.200 | \$4.800 | \$1.500 | \$0.240 | 0% |
| Qwen 3.7 Flash | `qwen3.7-flash` | 输入不超过 32,768 个 token 时的基础费率 | 1–32,768 | \$0.030 | \$0.130 | \$0.038 | \$0.006 | 0% |
| Qwen 3.7 Flash | `qwen3.7-flash` | 输入不超过 32,768 个 token 时的基础费率 | 32,769–262,144 | \$0.100 | \$0.400 | \$0.125 | \$0.020 | 0% |
| Qwen 3.7 Flash | `qwen3.7-flash` | 输入不超过 32,768 个 token 时的基础费率 | 262,145–1,000,000 | \$0.200 | \$0.800 | \$0.250 | \$0.040 | 0% |

每 100 万 token 的价格以美元列出。核价日期：GPT（2026-11-18）、Qwen（2026-11-20）。节省比例以标准输入价与常规市场参考价比较得出。实际价格可能因账号而异。费率为 \$0 表示该价目表对相应缓存类别不另收费。详见[API 定价](https://apixo.ai/pricing/api)。

对于 Qwen 3.7 Plus 和 Qwen 3.7 Flash，请求的总输入 token 选择一个定价层级。将该层级的输入、输出及适用的缓存费率应用于各自的使用计数。

在可下载模式中，分层模型的基本费率描述其第一层级。使用其 `tiers` 数组获取完整的费率卡。

GPT-6.2 Astra 和 Sol 使用同一个 Responses 端点。要明确指定较低的推理强度，请将 `reasoning.effort` 设为 `"low"`。这两个模型 ID 均不支持 `"none"`。

## 需要修改的内容

| 设置 | APIXO 值 |
| - | - |
| SDK Base URL | `https://llm.apixo.ai/v1` |
| 原始 HTTP 路径 | `POST /v1/responses` |
| 请求 URL | `https://llm.apixo.ai/v1/responses` |
| API密钥 | `APIXO_API_KEY` 来自 [APIXO API 密钥](https://apixo.ai/dashboard/api-keys) |
| API 密钥头 | `Authorization` |
| API 密钥值 | `Bearer $APIXO_API_KEY` |
| 模型位置 | 请求体 `model` |

## 快速入门

```bash theme={null}
export APIXO_API_KEY="your_apixo_api_key"
```

> [tab] cURL
>
> ```bash theme={null}
> curl -X POST "https://llm.apixo.ai/v1/responses" \
>   -H "Authorization: Bearer $APIXO_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "model": "gpt-6.2-sol",
>     "input": "Say hello in one sentence."
>   }'
> ```

> [tab] JavaScript
>
> ```javascript theme={null}
> import OpenAI from "openai";
>
> const client = new OpenAI({
>   apiKey: process.env.APIXO_API_KEY,
>   baseURL: "https://llm.apixo.ai/v1"
> });
>
> const response = await client.responses.create({
>   model: "gpt-6.2-sol",
>   input: "Say hello in one sentence."
> });
>
> console.log(response.output_text);
> ```

> [tab] Python
>
> ```python theme={null}
> import os
> from openai import OpenAI
>
> client = OpenAI(
>     api_key=os.environ["APIXO_API_KEY"],
>     base_url="https://llm.apixo.ai/v1",
> )
>
> response = client.responses.create(
>     model="gpt-6.2-sol",
>     input="Say hello in one sentence.",
> )
>
> print(response.output_text)
> ```

> [!TIP]
>
> 示例使用 `gpt-6.2-sol`。要将相同请求发送至 Qwen，请将 `model` 设置为 `qwen3.7-flash` 或表中另一个精确的 Qwen 模型 ID。

## 让AI来实现它

### 将此页复制到 AI

使用页面菜单中的 **复制页面** 按钮，将复制的文档粘贴到 AI 编码工具中，并添加以下提示：

```text theme={null}
Integrate the APIXO OpenAI Responses API into my existing project using the
documentation below.

Requirements:
- Use model gpt-6.2-sol unless my project already specifies another supported model.
- Read APIXO_API_KEY from an environment variable and keep it server-side.
- Preserve my current language, framework, and project structure.
- Add the smallest working integration and one minimal verification request.
- Do not invent endpoints, model IDs, or request fields that are not documented.
```

将提示中的 `gpt-6.2-sol` 替换为比较表中的任意模型 ID。

### 远程 MCP 可用性

使用 `list_models` 和 `integration_type: llm_gateway` 来发现 GPT 和 Qwen 模型 ID。将所选的 ID 传递到 `get_model_schema`（用于响应合约）或传递到 `get_integration_guide`（用于服务器端 SDK 设置）。 [APIXO MCP](https://apixo.ai/docs/zh/integrations/mcp)

## 流式传输

```bash theme={null}
curl -N -X POST "https://llm.apixo.ai/v1/responses" \
  -H "Authorization: Bearer $APIXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6.2-sol",
    "stream": true,
    "input": "Write a short changelog summary."
  }'
```

## 支持的 OpenAI 响应模型

使用上述所示兼容 API 格式中的一个精确模型 ID。

* `gpt-6.2-astra`
* `gpt-6.2-sol`
* `gpt-6.1-sol`
* `gpt-6.1-terra`
* `gpt-6-astra`
* `gpt-6-sol`
* `gpt-5.6-sol`
* `gpt-5.6-terra`
* `gpt-5.6-luna`
* `gpt-5.5`
* `gpt-5.4`
* `gpt-5.4-mini`
* `gpt-5-mini`
* `qwen4-max`
* `qwen3.8-max`
* `qwen3.8-flash`
* `qwen3.7-plus`
* `qwen3.7-flash`

要切换型号，请保留端点系列、API密钥和请求格式，然后更改型号ID。

## 故障排除

* `401`：API密钥缺失或无效
* `400`：Responses API 请求体无效、模型 ID 拼写错误或模型不受支持
* `429`：速率限制或临时容量限制
* `502`/`504`：服务错误或超时

对`429`、`502`和`504`使用退避重试；在重试前先修复`400`和`401`。

## 相关链接

* [Chat API概述](https://apixo.ai/docs/zh/llm)
* [支持的型号](https://apixo.ai/docs/zh/llm/supported-models.md)
* [LLM 身份验证](https://apixo.ai/docs/zh/llm/authentication.md)
* [LLM 流媒体](https://apixo.ai/docs/zh/llm/streaming.md)
* [LLM 错误并重试](https://apixo.ai/docs/zh/llm/errors-retry.md)
* [安装APIXO MCP](https://apixo.ai/docs/zh/integrations/mcp/installation.md)
* [探索 OpenAI 模型上 APIXO](https://apixo.ai/models/llm/openai)
* [API定价](https://apixo.ai/pricing/api)

## 在 APIXO 上调用模型

使用 [API 定价](https://apixo.ai/pricing/api) 了解当前模型的可用性和价格。即使 Playground 选择器尚未添加模型，也可直接使用上述 API 模型 ID。


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