> ## 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 費率。

使用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-hant/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 回應模型

使用這些精確模型 ID 之一以及上面顯示的兼容 API 格式。

* `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-hant/llm)
* [支援的型號](https://apixo.ai/docs/zh-hant/llm/supported-models.md)
* [LLM 身分驗證](https://apixo.ai/docs/zh-hant/llm/authentication.md)
* [LLM 串流](https://apixo.ai/docs/zh-hant/llm/streaming.md)
* [LLM 錯誤並重試](https://apixo.ai/docs/zh-hant/llm/errors-retry.md)
* [安裝APIXO MCP](https://apixo.ai/docs/zh-hant/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.