---
title: NextChat | RunAPI
description: 使用自訂端點與模型將 NextChat 連接至 RunAPI。
url: https://runapi.ai/zh-TW/docs/resources/application-practices/nextchat.md
canonical: https://runapi.ai/zh-TW/docs/resources/application-practices/nextchat
locale: zh-TW
---

> HTML 版本: https://runapi.ai/zh-TW/docs/resources/application-practices/nextchat
> 代理程式網站索引: https://runapi.ai/llms.txt

# NextChat

透過自訂 OpenAI 端點將 NextChat 連接至 RunAPI。NextChat 組成操作路徑的方式與本群組中其他用戶端不同，因此請使用下方的確切端點值。在繼續操作前，請先至[身分驗證指南](https://runapi.ai/zh-TW/docs/guides/authentication.md)建立標準 RunAPI API 金鑰。

## 安裝或部署 NextChat

從 [NextChat 官方儲存庫][1]選擇桌面版本或部署方式，然後開啟**設定**。



[1]: https://github.com/ChatGPTNextWeb/NextChat

## 設定自訂端點

1.  在 Web 應用程式中，啟用**自訂端點**並選擇 **OpenAI**。桌面應用程式一律使用自訂設定。
2.  將端點位址設為 `https://runapi.ai`，不含 `/v1`。
3.  輸入您的 RunAPI API 金鑰。
4.  在**自訂模型名稱**下，新增來自[模型目錄](https://runapi.ai/zh-TW/models)的確切識別碼，然後將其選為目前對話所用的模型。

此設定是 NextChat 的端點根路徑，而非 OpenAI SDK 所使用的與 OpenAI 相容的 Base URL。NextChat 會自行附加 `v1/chat/completions`，產生 `https://runapi.ai/v1/chat/completions`。其 OpenAI 用戶端不會擷取 RunAPI 模型列表，因此請手動新增識別碼，而非等待自動探索。

## 設定自架部署

對於自架安裝，請設定這些環境變數並重新部署或重新啟動應用程式：

```shell
BASE_URL=https://runapi.ai
OPENAI_API_KEY=YOUR_RUNAPI_API_TOKEN
CUSTOM_MODELS=+YOUR_RUNAPI_MODEL_ID
```

`+` 前綴會新增模型，而不取代應用程式現有的模型項目。

## 驗證連線

開啟新的對話，選取自訂的 RunAPI 模型，並傳送 `Reply with
the word connected.`。收到正常的完整或串流回應即確認自訂端點已啟用。

## 疑難排解

* **請求 URL 包含 `/v1/v1/chat/completions`：** 請從端點位址中移除 `/v1`，並改用 `https://runapi.ai`。
* **NextChat 仍使用內建模型：** 請在 **Custom Model Name** 下新增正確的識別碼，然後在目前的對話中重新選取它。
* **網頁設定沒有效果：** 請確認 **Custom Endpoint** 已啟用；桌面應用程式與網頁應用程式對此開關的處理方式不同。
* **自托管的變更沒有效果：** 請在修改 `BASE_URL`、`OPENAI_API_KEY` 或 `CUSTOM_MODELS` 後重新啟動或重新部署。

如需共用協定行為，請參閱 [LLM API 快速入門](https://runapi.ai/zh-TW/docs/guides/llm-api/quickstart.md)。如需請求與回應欄位，請參閱 [Chat Completions API 參考](https://runapi.ai/zh-TW/docs/api/openai/chat-completions.md)。

---

## RunAPI 的更多內容

- [首頁](https://runapi.ai/zh-TW/.md)
- [模型目錄](https://runapi.ai/zh-TW/models.md)
- [價格](https://runapi.ai/zh-TW/pricing.md)
- [提供商](https://runapi.ai/zh-TW/models)
- [文件](https://runapi.ai/zh-TW/docs/guides)
- [SDK](https://runapi.ai/zh-TW/sdk.md)
- [CLI](https://runapi.ai/zh-TW/cli.md)
- [MCP Server](https://runapi.ai/zh-TW/mcp.md)
- [Claude Code 與 Cursor](https://runapi.ai/zh-TW/claude-code-vs-cursor.md)
- [Cursor API 設定](https://runapi.ai/zh-TW/cursor-api-setup.md)
- [RunAPI 與 OpenRouter](https://runapi.ai/zh-TW/openrouter-alternative.md)
- [企業版](https://runapi.ai/zh-TW/contact.md)
- [聯絡我們](https://runapi.ai/zh-TW/contact.md)
- [服務條款](https://runapi.ai/zh-TW/terms.md)
- [隱私權](https://runapi.ai/zh-TW/privacy.md)
- [代理程式網站索引](https://runapi.ai/llms.txt)

聯絡我們: contact@runapi.ai

## 結構化資料

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-TW",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/zh-TW/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-TW",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/zh-TWicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "TechArticle",
    "headline": "NextChat",
    "description": "使用自訂端點與模型將 NextChat 連接至 RunAPI。",
    "url": "https://runapi.ai/zh-TW/docs/resources/application-practices/nextchat",
    "mainEntityOfPage": "https://runapi.ai/zh-TW/docs/resources/application-practices/nextchat"
  }
]
```
