{"id":304,"date":"2026-10-11T02:14:46","date_gmt":"2026-10-11T02:14:46","guid":{"rendered":"https:\/\/ntokenx.com\/blog\/index.php\/2026\/10\/11\/openwebui-custom-openai-api\/"},"modified":"2026-10-11T02:14:46","modified_gmt":"2026-10-11T02:14:46","slug":"openwebui-custom-openai-api","status":"publish","type":"post","link":"https:\/\/ntokenx.com\/blog\/index.php\/2026\/10\/11\/openwebui-custom-openai-api\/","title":{"rendered":"OpenWebUI\u914d\u7f6e\u81ea\u5b9a\u4e49OpenAI\u63a5\u53e3\u6559\u7a0b"},"content":{"rendered":"<p><em>\u4f5c\u8005\uff1anTokenX\uff5c\u53d1\u5e03\u65e5\u671f\uff1a2026-10-11\uff5c\u66f4\u65b0\u65e5\u671f\uff1a2026-10-11<\/em><\/p>\n<p>OpenWebUI\u914d\u7f6e\u81ea\u5b9a\u4e49OpenAI\u63a5\u53e3\u6559\u7a0b\u7684\u6838\u5fc3\uff0c\u5c31\u662f\u628a\u670d\u52a1\u5546\u63d0\u4f9b\u7684 <strong>Base URL\u3001API Key \u548c\u6a21\u578b ID<\/strong> \u586b\u5165 Open WebUI \u7684\u5916\u90e8\u8fde\u63a5\u8bbe\u7f6e\u3002\u53ea\u8981\u63a5\u53e3\u9075\u5faa OpenAI \u517c\u5bb9\u534f\u8bae\uff0c\u5c31\u80fd\u5728\u540c\u4e00\u4e2a\u754c\u9762\u8c03\u7528\u4e91\u7aef\u6216\u81ea\u5efa\u6a21\u578b\u3002<\/p>\n<figure class=\"wp-block-image size-large\" style=\"margin:1.5em 0;\"><img decoding=\"async\" src=\"https:\/\/ntokenx.com\/blog\/wp-content\/uploads\/2026\/10\/backend-6061-1.jpg\" alt=\"OpenWebUI\u914d\u7f6e\u81ea\u5b9a\u4e49OpenAI\u63a5\u53e3\u6559\u7a0b\u7684\u8fde\u63a5\u8bbe\u7f6e\u793a\u610f\u56fe\" style=\"max-width:100%;height:auto;\"><\/figure>\n<h2>\u4ec0\u4e48\u662f Open WebUI \u81ea\u5b9a\u4e49 OpenAI \u63a5\u53e3<\/h2>\n<p>Open WebUI \u7684\u201c\u81ea\u5b9a\u4e49 OpenAI \u63a5\u53e3\u201d\u5e76\u4e0d\u9650\u5b9a\u4e3a OpenAI \u5b98\u65b9\u670d\u52a1\uff0c\u800c\u662f\u6307\u5411\u4e00\u4e2a\u517c\u5bb9 OpenAI API \u683c\u5f0f\u7684\u6a21\u578b\u670d\u52a1\u3002\u5b98\u65b9\u6587\u6863\u663e\u793a\uff0cOpen WebUI \u4e3b\u8981\u901a\u8fc7 OpenAI \u517c\u5bb9\u534f\u8bae\u8fde\u63a5\u4e0d\u540c\u6a21\u578b\u670d\u52a1\uff0c\u914d\u7f6e\u5165\u53e3\u901a\u5e38\u4f4d\u4e8e <strong>\u8bbe\u7f6e \u2192 \u7ba1\u7406\u5458\u8bbe\u7f6e \u2192 \u5916\u90e8\u8fde\u63a5<\/strong>\u3002(<a href=\"https:\/\/docs.openwebui.com\/getting-started\/quick-start\/connect-a-provider\/starting-with-openai\/\">docs.openwebui.com<\/a>)<\/p>\n<p>\u8fd9\u610f\u5473\u7740\u4f60\u53ef\u4ee5\u63a5\u5165\u5b98\u65b9 API\u3001\u4f01\u4e1a\u7f51\u5173\u3001\u672c\u5730\u6a21\u578b\u670d\u52a1\uff0c\u6216\u63d0\u4f9b\u7edf\u4e00\u63a5\u53e3\u7684\u591a\u6a21\u578b API \u805a\u5408\u5e73\u53f0\u3002\u5e38\u89c1\u5fc5\u9700\u4fe1\u606f\u5982\u4e0b\uff1a<\/p>\n<div style=\"overflow-x:auto;\">\n<table style=\"width:100%;border-collapse:collapse;margin:1.5em 0;font-size:0.95em;\">\n<thead>\n<tr>\n<th style=\"border:1px solid #e3e6ea;padding:8px 12px;background:#f6f8fa;text-align:left;font-weight:600;\">\u914d\u7f6e\u9879<\/th>\n<th style=\"border:1px solid #e3e6ea;padding:8px 12px;background:#f6f8fa;text-align:left;font-weight:600;\">\u4f5c\u7528<\/th>\n<th style=\"border:1px solid #e3e6ea;padding:8px 12px;background:#f6f8fa;text-align:left;font-weight:600;\">\u793a\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">Base URL<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u6307\u5b9a API \u670d\u52a1\u5730\u5740<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\"><code>https:\/\/example.com\/v1<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">API Key<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u5b8c\u6210\u63a5\u53e3\u9274\u6743<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\"><code>sk-xxxx<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">Model ID<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u6307\u5b9a\u53ef\u8c03\u7528\u6a21\u578b<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\"><code>gpt-xxx<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">API Type<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u9009\u62e9\u8c03\u7528\u534f\u8bae<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">Chat Completions<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u9700\u8981\u6ce8\u610f\uff0c<strong>Base URL \u901a\u5e38\u5e94\u586b\u5199\u5230 <code>\/v1<\/code> \u5c42\u7ea7<\/strong>\uff0c\u4f46\u6700\u7ec8\u4ecd\u4ee5\u670d\u52a1\u5546\u6587\u6863\u4e3a\u51c6\u3002Open WebUI \u5b98\u65b9\u517c\u5bb9\u63a5\u53e3\u8bf4\u660e\u4e2d\uff0c\u804a\u5929\u529f\u80fd\u81f3\u5c11\u9700\u8981\u652f\u6301 <code>\/v1\/chat\/completions<\/code>\uff1b\u5982\u679c\u5e0c\u671b\u81ea\u52a8\u8bfb\u53d6\u6a21\u578b\u5217\u8868\uff0c\u8fd8\u5e94\u652f\u6301 <code>\/v1\/models<\/code>\u3002(<a href=\"https:\/\/docs.openwebui.com\/getting-started\/quick-start\/connect-a-provider\/starting-with-openai-compatible\/\">docs.openwebui.com<\/a>)<\/p>\n<h2>OpenWebUI\u914d\u7f6e\u81ea\u5b9a\u4e49OpenAI\u63a5\u53e3\u6559\u7a0b\uff1a\u6807\u51c6\u914d\u7f6e\u6b65\u9aa4<\/h2>\n<h3>\u7b2c\u4e00\u6b65\uff1a\u8fdb\u5165\u5916\u90e8\u8fde\u63a5\u8bbe\u7f6e<\/h3>\n<p>\u767b\u5f55 Open WebUI \u540e\uff0c\u4f9d\u6b21\u6253\u5f00\uff1a<\/p>\n<ol>\n<li>\u70b9\u51fb\u5de6\u4e0b\u89d2\u7528\u6237\u5934\u50cf\uff1b<\/li>\n<li>\u8fdb\u5165 <strong>\u7ba1\u7406\u5458\u8bbe\u7f6e<\/strong>\uff1b<\/li>\n<li>\u6253\u5f00 <strong>\u8bbe\u7f6e \u2192 \u5916\u90e8\u8fde\u63a5<\/strong>\uff1b<\/li>\n<li>\u627e\u5230 <strong>\u7ba1\u7406 OpenAI API \u8fde\u63a5<\/strong>\uff1b<\/li>\n<li>\u70b9\u51fb\u6dfb\u52a0\u8fde\u63a5\u3002<\/li>\n<\/ol>\n<p>\u4e0d\u540c\u7248\u672c\u7684\u754c\u9762\u540d\u79f0\u53ef\u80fd\u7565\u6709\u53d8\u5316\uff0c\u4f46\u6838\u5fc3\u4f4d\u7f6e\u90fd\u662f\u7ba1\u7406\u5458\u8fde\u63a5\u7ba1\u7406\u533a\u57df\u3002<\/p>\n<h3>\u7b2c\u4e8c\u6b65\uff1a\u586b\u5199 Base URL \u4e0e API Key<\/h3>\n<p>\u5728\u8fde\u63a5\u7a97\u53e3\u4e2d\u586b\u5199\uff1a<\/p>\n<pre><code class=\"language-text\">URL\uff1a\nhttps:\/\/\u4f60\u7684\u670d\u52a1\u5546\u57df\u540d\/v1\n\nAPI Key\uff1a\n\u4f60\u7684\u63a5\u53e3\u5bc6\u94a5\n<\/code><\/pre>\n<p>\u5982\u679c\u4f7f\u7528 nTokenX \u8fd9\u7c7b\u7edf\u4e00 API\uff0c\u53ef\u5148\u5728\u5e73\u53f0\u521b\u5efa\u6216\u83b7\u53d6 API Key\uff0c\u518d\u5c06\u5e73\u53f0\u63d0\u4f9b\u7684\u517c\u5bb9\u63a5\u53e3\u5730\u5740\u586b\u5165 URL\u3002nTokenX \u7684\u4f7f\u7528\u65b9\u5f0f\u662f\u7533\u8bf7\u4e00\u4e2a API Key \u540e\uff0c\u901a\u8fc7\u7edf\u4e00\u63a5\u53e3\u8c03\u7528 GPT\u3001Claude\u3001Gemini\u3001Grok \u7b49\u591a\u4e2a\u6a21\u578b\uff0c\u5177\u4f53\u53ef\u7528\u6a21\u578b\u4ee5\u8d26\u6237\u548c\u63a5\u53e3\u8fd4\u56de\u7ed3\u679c\u4e3a\u51c6\u3002<\/p>\n<p>\u5bf9\u4e8e OpenAI \u5b98\u65b9\u63a5\u53e3\uff0c\u5b98\u65b9\u793a\u4f8b\u5730\u5740\u4e3a <code>https:\/\/api.openai.com\/v1<\/code>\u3002\u5bf9\u4e8e\u5176\u4ed6\u517c\u5bb9\u670d\u52a1\uff0c\u4e0d\u8981\u673a\u68b0\u590d\u5236\u8fd9\u4e2a\u5730\u5740\uff0c\u800c\u8981\u786e\u8ba4\u670d\u52a1\u5546\u662f\u5426\u8981\u6c42\u989d\u5916\u8def\u5f84\u3001\u7248\u672c\u53f7\u6216\u7279\u6b8a\u8bf7\u6c42\u5934\u3002(<a href=\"https:\/\/docs.openwebui.com\/getting-started\/quick-start\/connect-a-provider\/starting-with-openai\/\">docs.openwebui.com<\/a>)<\/p>\n<h3>\u7b2c\u4e09\u6b65\uff1a\u5904\u7406\u6a21\u578b\u5217\u8868<\/h3>\n<p>\u4fdd\u5b58\u8fde\u63a5\u540e\uff0cOpen WebUI \u901a\u5e38\u4f1a\u8bf7\u6c42 <code>\/v1\/models<\/code> \u81ea\u52a8\u8bfb\u53d6\u6a21\u578b\u3002\u5982\u679c\u6a21\u578b\u5217\u8868\u4e3a\u7a7a\uff0c\u53ef\u4ee5\u5728\u9ad8\u7ea7\u8bbe\u7f6e\u4e2d\u7684 <strong>Model IDs<\/strong> \u624b\u52a8\u586b\u5199\u6a21\u578b ID\u3002<\/p>\n<p>\u5efa\u8bae\u5148\u53ea\u586b\u5199\u4e00\u4e2a\u5df2\u786e\u8ba4\u53ef\u7528\u7684\u6a21\u578b\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-text\">model-a\n<\/code><\/pre>\n<p>\u786e\u8ba4\u5355\u6a21\u578b\u80fd\u591f\u6b63\u5e38\u5bf9\u8bdd\u540e\uff0c\u518d\u9010\u6b65\u52a0\u5165\u5176\u4ed6\u6a21\u578b\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u6a21\u578b\u540d\u79f0\u9519\u8bef\u3001\u6743\u9650\u4e0d\u8db3\u548c\u63a5\u53e3\u672a\u5f00\u653e\u7b49\u95ee\u9898\u540c\u65f6\u51fa\u73b0\u3002<\/p>\n<p>\u5982\u679c\u670d\u52a1\u7aef\u4e0d\u652f\u6301 <code>\/models<\/code> \u81ea\u52a8\u53d1\u73b0\uff0cOpen WebUI \u5b98\u65b9\u5efa\u8bae\u4f7f\u7528\u6a21\u578b\u767d\u540d\u5355\u624b\u52a8\u6307\u5b9a\u6a21\u578b ID\u3002(<a href=\"https:\/\/docs.openwebui.com\/getting-started\/quick-start\/connect-a-provider\/starting-with-openai-compatible\/\">docs.openwebui.com<\/a>)<\/p>\n<figure class=\"wp-block-image size-large\" style=\"margin:1.5em 0;\"><img decoding=\"async\" src=\"https:\/\/ntokenx.com\/blog\/wp-content\/uploads\/2026\/10\/backend-6061-2.jpg\" alt=\"OpenWebUI\u914d\u7f6e\u81ea\u5b9a\u4e49OpenAI\u63a5\u53e3\u6559\u7a0b\u4e2d\u7684\u6a21\u578b ID \u914d\u7f6e\u793a\u610f\u56fe\" style=\"max-width:100%;height:auto;\"><\/figure>\n<h2>Docker \u90e8\u7f72\u65f6\u6700\u5bb9\u6613\u51fa\u9519\u7684\u4e09\u4e2a\u53c2\u6570<\/h2>\n<h3>1. \u4e0d\u8981\u628a localhost \u5f53\u6210\u5bbf\u4e3b\u673a\u5730\u5740<\/h3>\n<p>\u5982\u679c Open WebUI \u8fd0\u884c\u5728 Docker \u5bb9\u5668\u5185\uff0c\u800c\u6a21\u578b\u670d\u52a1\u8fd0\u884c\u5728\u5bbf\u4e3b\u673a\uff0c\u5bb9\u5668\u91cc\u7684 <code>localhost<\/code> \u6307\u5411\u7684\u662f\u5bb9\u5668\u81ea\u8eab\uff0c\u4e0d\u662f\u5bbf\u4e3b\u673a\u3002\u5b98\u65b9\u6587\u6863\u5efa\u8bae\u5728\u6b64\u573a\u666f\u5c1d\u8bd5\u4f7f\u7528\uff1a<\/p>\n<pre><code class=\"language-text\">http:\/\/host.docker.internal:\u7aef\u53e3\/v1\n<\/code><\/pre>\n<p>Linux \u73af\u5883\u662f\u5426\u9ed8\u8ba4\u652f\u6301\u8be5\u57df\u540d\uff0c\u53d6\u51b3\u4e8e Docker \u914d\u7f6e\uff1b\u5fc5\u8981\u65f6\u9700\u8981\u901a\u8fc7 <code>extra_hosts<\/code> \u6620\u5c04\u5bbf\u4e3b\u673a\u5730\u5740\u3002(<a href=\"https:\/\/docs.openwebui.com\/getting-started\/quick-start\/connect-a-provider\/starting-with-openai-compatible\/\">docs.openwebui.com<\/a>)<\/p>\n<h3>2. \u4e0d\u8981\u91cd\u590d\u62fc\u63a5 <code>\/v1<\/code><\/h3>\n<p>\u5e38\u89c1\u9519\u8bef\u662f\u670d\u52a1\u5546\u5730\u5740\u672c\u8eab\u5df2\u7ecf\u5305\u542b <code>\/v1<\/code>\uff0c\u7528\u6237\u53c8\u5728 Open WebUI \u4e2d\u91cd\u590d\u586b\u5199\uff0c\u6700\u7ec8\u5f62\u6210\uff1a<\/p>\n<pre><code class=\"language-text\">https:\/\/example.com\/v1\/v1\n<\/code><\/pre>\n<p>\u51fa\u73b0 404 \u6216\u8def\u7531\u4e0d\u5b58\u5728\u65f6\uff0c\u4f18\u5148\u68c0\u67e5 Base URL \u7684\u8def\u5f84\u5c42\u7ea7\u3002<\/p>\n<h3>3. \u533a\u5206\u8fde\u63a5\u5730\u5740\u4e0e\u6a21\u578b\u540d\u79f0<\/h3>\n<p>Base URL \u662f\u670d\u52a1\u5668\u5730\u5740\uff0cModel ID \u662f\u6a21\u578b\u6807\u8bc6\uff0c\u4e24\u8005\u4e0d\u80fd\u4e92\u6362\u3002\u6bd4\u5982\uff1a<\/p>\n<pre><code class=\"language-text\">Base URL\uff1a https:\/\/example.com\/v1\nModel ID\uff1a claude-model-name\n<\/code><\/pre>\n<p>\u4e0d\u8981\u628a\u5b8c\u6574\u804a\u5929\u63a5\u53e3\u5730\u5740 <code>\/chat\/completions<\/code> \u586b\u8fdb Base URL\uff0cOpen WebUI \u4f1a\u81ea\u884c\u62fc\u63a5\u8bf7\u6c42\u8def\u5f84\u3002<\/p>\n<h2>\u4e00\u5957\u66f4\u53ef\u9760\u7684\u63a5\u53e3\u9a8c\u6536\u65b9\u6cd5<\/h2>\n<p>\u4ec5\u770b\u5230\u6a21\u578b\u51fa\u73b0\u5728\u4e0b\u62c9\u83dc\u5355\uff0c\u5e76\u4e0d\u4ee3\u8868\u63a5\u53e3\u5b8c\u5168\u517c\u5bb9\u3002\u9488\u5bf9 Open WebUI \u63a5\u5165\uff0c\u6211\u5efa\u8bae\u4f7f\u7528\u201c\u56db\u5c42\u9a8c\u6536\u6846\u67b6\u201d\uff1a<\/p>\n<ol>\n<li><strong>\u53d1\u73b0\u5c42<\/strong>\uff1a\u80fd\u5426\u6210\u529f\u8bfb\u53d6 <code>\/v1\/models<\/code>\uff1b<\/li>\n<li><strong>\u5bf9\u8bdd\u5c42<\/strong>\uff1a\u80fd\u5426\u5b8c\u6210\u666e\u901a\u975e\u6d41\u5f0f\u8bf7\u6c42\uff1b<\/li>\n<li><strong>\u6d41\u5f0f\u5c42<\/strong>\uff1a\u56de\u590d\u662f\u5426\u6301\u7eed\u8f93\u51fa\uff0c\u800c\u4e0d\u662f\u957f\u65f6\u95f4\u7b49\u5f85\u540e\u4e00\u6b21\u6027\u8fd4\u56de\uff1b<\/li>\n<li><strong>\u80fd\u529b\u5c42<\/strong>\uff1a\u5de5\u5177\u8c03\u7528\u3001\u56fe\u7247\u3001\u5d4c\u5165\u6216\u8bed\u97f3\u7b49\u529f\u80fd\u662f\u5426\u786e\u5b9e\u88ab\u670d\u52a1\u7aef\u652f\u6301\u3002<\/li>\n<\/ol>\n<p>Open WebUI \u5b98\u65b9\u5217\u51fa\u7684\u517c\u5bb9\u63a5\u53e3\u4e2d\uff0c\u804a\u5929\u8865\u5168\u662f\u6838\u5fc3\u80fd\u529b\uff1b\u5d4c\u5165\u3001\u8bed\u97f3\u8f6c\u6587\u5b57\u3001\u6587\u5b57\u8f6c\u8bed\u97f3\u548c\u56fe\u50cf\u751f\u6210\u5219\u5c5e\u4e8e\u53ef\u9009\u63a5\u53e3\u3002(<a href=\"https:\/\/docs.openwebui.com\/getting-started\/quick-start\/connect-a-provider\/starting-with-openai-compatible\/\">docs.openwebui.com<\/a>)<\/p>\n<p>\u8fd9\u4e2a\u6846\u67b6\u7684\u4ef7\u503c\u5728\u4e8e\uff1a<strong>\u6a21\u578b\u80fd\u804a\u5929\uff0c\u4e0d\u7b49\u4e8e RAG\u3001\u8bed\u97f3\u6216\u5de5\u5177\u8c03\u7528\u4e5f\u80fd\u7528<\/strong>\u3002\u5982\u679c\u4f60\u53ea\u9700\u8981\u6587\u672c\u5bf9\u8bdd\uff0c\u5b8c\u6210\u524d\u4e24\u5c42\u5373\u53ef\uff1b\u5982\u679c\u8981\u642d\u5efa\u77e5\u8bc6\u5e93\uff0c\u8fd8\u5e94\u786e\u8ba4 <code>\/v1\/embeddings<\/code> \u662f\u5426\u53ef\u7528\u3002<\/p>\n<h2>\u5e38\u89c1\u9519\u8bef\u4e0e\u6392\u67e5\u987a\u5e8f<\/h2>\n<div style=\"overflow-x:auto;\">\n<table style=\"width:100%;border-collapse:collapse;margin:1.5em 0;font-size:0.95em;\">\n<thead>\n<tr>\n<th style=\"border:1px solid #e3e6ea;padding:8px 12px;background:#f6f8fa;text-align:left;font-weight:600;\">\u73b0\u8c61<\/th>\n<th style=\"border:1px solid #e3e6ea;padding:8px 12px;background:#f6f8fa;text-align:left;font-weight:600;\">\u5e38\u89c1\u539f\u56e0<\/th>\n<th style=\"border:1px solid #e3e6ea;padding:8px 12px;background:#f6f8fa;text-align:left;font-weight:600;\">\u4f18\u5148\u5904\u7406\u65b9\u5f0f<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u6a21\u578b\u5217\u8868\u4e3a\u7a7a<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u4e0d\u652f\u6301 <code>\/models<\/code> \u6216\u6a21\u578b ID \u9519\u8bef<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u624b\u52a8\u586b\u5199 Model IDs<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">401 \/ 403<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">API Key \u65e0\u6548\u6216\u6743\u9650\u4e0d\u8db3<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u91cd\u65b0\u751f\u6210\u5bc6\u94a5\u5e76\u786e\u8ba4\u6743\u9650<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">404<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">Base URL \u8def\u5f84\u9519\u8bef<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u68c0\u67e5\u662f\u5426\u91cd\u590d <code>\/v1<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u8fde\u63a5\u8d85\u65f6<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">Docker \u7f51\u7edc\u3001\u57df\u540d\u6216\u670d\u52a1\u7aef\u54cd\u5e94\u6162<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u5148\u7528\u6d4f\u89c8\u5668\u6216\u547d\u4ee4\u884c\u6d4b\u8bd5\u5730\u5740<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u80fd\u770b\u5230\u6a21\u578b\u4f46\u65e0\u6cd5\u56de\u590d<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u6a21\u578b\u540d\u79f0\u6620\u5c04\u9519\u8bef\u6216\u804a\u5929\u63a5\u53e3\u4e0d\u517c\u5bb9<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u6838\u5bf9 <code>\/chat\/completions<\/code> \u4e0e Model ID<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u56de\u590d\u4e2d\u9014\u505c\u6b62<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u6d41\u5f0f\u54cd\u5e94\u683c\u5f0f\u4e0d\u517c\u5bb9<\/td>\n<td style=\"border:1px solid #e3e6ea;padding:8px 12px;vertical-align:top;\">\u68c0\u67e5 SSE \u6d41\u5f0f\u8fd4\u56de\u548c\u7f51\u5173\u914d\u7f6e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u5982\u679c\u6a21\u578b\u5217\u8868\u8bf7\u6c42\u957f\u65f6\u95f4\u5361\u4f4f\uff0cOpen WebUI \u5b98\u65b9\u8fd8\u63d0\u4f9b\u4e86\u6a21\u578b\u5217\u8868\u8d85\u65f6\u914d\u7f6e\u9009\u9879\uff0c\u4f8b\u5982\u901a\u8fc7 <code>AIOHTTP_CLIENT_TIMEOUT_MODEL_LIST<\/code> \u8c03\u6574\u8bf7\u6c42\u7b49\u5f85\u65f6\u95f4\u3002(<a href=\"https:\/\/docs.openwebui.com\/getting-started\/quick-start\/connect-a-provider\/starting-with-openai\/\">docs.openwebui.com<\/a>)<\/p>\n<p>\u5bf9\u4e8e\u5e0c\u671b\u5728\u591a\u4e2a\u5ba2\u6237\u7aef\u590d\u7528\u540c\u4e00\u63a5\u53e3\u7684\u56e2\u961f\uff0c\u53ef\u4ee5\u8fdb\u4e00\u6b65\u53c2\u8003 <a href=\"https:\/\/ntokenx.com\/blog\/index.php\/2026\/10\/05\/cherry-studio-api\/\">Cherry Studio \u914d\u7f6e\u7b2c\u4e09\u65b9\u670d\u52a1\u5546 API \u7684\u53c2\u6570\u4e0e\u6392\u9519\u6307\u5357<\/a>\uff1b\u5982\u679c\u4e3b\u8981\u4f7f\u7528 NextChat\uff0c\u5219\u53ef\u67e5\u770b <a href=\"https:\/\/ntokenx.com\/blog\/index.php\/2026\/09\/27\/nextchat-custom-provider-api-tutorial\/\">NextChat \u914d\u7f6e\u81ea\u5b9a\u4e49\u670d\u52a1\u5546\u63a5\u53e3\u6559\u7a0b<\/a>\u3002<\/p>\n<h2>Open WebUI \u8fde\u63a5\u5b98\u65b9 API\u3001\u7f51\u5173\u548c\u7edf\u4e00 API \u6709\u4ec0\u4e48\u533a\u522b<\/h2>\n<p>\u4e09\u7c7b\u8fde\u63a5\u5728\u586b\u5199\u65b9\u5f0f\u4e0a\u76f8\u4f3c\uff0c\u4f46\u8d23\u4efb\u8fb9\u754c\u4e0d\u540c\uff1a<\/p>\n<ul>\n<li><strong>\u5b98\u65b9 API<\/strong>\uff1a\u7531\u6a21\u578b\u5382\u5546\u76f4\u63a5\u63d0\u4f9b\uff0c\u6a21\u578b\u540d\u79f0\u3001\u8ba1\u8d39\u548c\u6743\u9650\u7531\u5b98\u65b9\u8d26\u6237\u63a7\u5236\uff1b<\/li>\n<li><strong>\u6b63\u89c4 API \u805a\u5408\u6216\u7f51\u5173<\/strong>\uff1a\u7528\u6237\u7ed1\u5b9a\u81ea\u5df1\u7684\u6a21\u578b\u5382\u5546 Key\uff0c\u5e73\u53f0\u8d1f\u8d23\u7edf\u4e00\u8f6c\u53d1\u3001\u8ba1\u8d39\u3001\u76d1\u63a7\u6216\u8def\u7531\uff1b<\/li>\n<li><strong>\u7b2c\u4e09\u65b9\u6a21\u578b\u4e2d\u8f6c<\/strong>\uff1a\u5e73\u53f0\u91c7\u8d2d\u6216\u4ee3\u7406\u6a21\u578b\u989d\u5ea6\uff0c\u518d\u5411\u7528\u6237\u63d0\u4f9b\u7edf\u4e00 API\u3002<\/li>\n<\/ul>\n<p>\u9009\u62e9\u65f6\u4e0d\u8981\u53ea\u770b\u201c\u80fd\u5426\u8fde\u901a\u201d\uff0c\u8fd8\u8981\u6838\u5bf9\u6388\u6743\u6765\u6e90\u3001\u6570\u636e\u5904\u7406\u65b9\u5f0f\u3001\u6545\u969c\u54cd\u5e94\u3001\u6a21\u578b\u6620\u5c04\u548c\u8d26\u5355\u8bb0\u5f55\u3002\u5bf9\u4e8e\u4f01\u4e1a\u573a\u666f\uff0c\u5efa\u8bae\u4f18\u5148\u9009\u62e9\u80fd\u591f\u63d0\u4f9b\u6e05\u6670\u63a5\u53e3\u6587\u6863\u3001\u8d26\u6237\u9694\u79bb\u548c\u7528\u91cf\u8bb0\u5f55\u7684\u670d\u52a1\uff0c\u5e76\u5c06\u751f\u4ea7 Key \u4e0e\u6d4b\u8bd5 Key \u5206\u5f00\u7ba1\u7406\u3002<\/p>\n<p>\u5982\u679c\u4f60\u9700\u8981\u591a\u4e2a\u6a21\u578b\u5171\u7528\u4e00\u4e2a\u8c03\u7528\u5165\u53e3\uff0c\u53ef\u9605\u8bfb <a href=\"https:\/\/ntokenx.com\/blog\/index.php\/2026\/09\/23\/domestic-ai-api-aggregation\/\">\u591a\u6a21\u578b API \u805a\u5408\u670d\u52a1\u7684\u7edf\u4e00\u63a5\u5165\u6307\u5357<\/a>\uff0c\u91cd\u70b9\u6bd4\u8f83\u534f\u8bae\u517c\u5bb9\u3001\u6a21\u578b\u8def\u7531\u4e0e\u8fd0\u7ef4\u8d23\u4efb\uff0c\u800c\u4e0d\u662f\u5355\u7eaf\u6bd4\u8f83\u6a21\u578b\u6570\u91cf\u3002<\/p>\n<figure class=\"wp-block-image size-large\" style=\"margin:1.5em 0;\"><img decoding=\"async\" src=\"https:\/\/ntokenx.com\/blog\/wp-content\/uploads\/2026\/10\/backend-6061-3.jpg\" alt=\"Open WebUI \u8fde\u63a5\u591a\u6a21\u578b\u7edf\u4e00 API \u7684\u67b6\u6784\u793a\u610f\u56fe\" style=\"max-width:100%;height:auto;\"><\/figure>\n<h2>\u5e38\u89c1\u95ee\u9898<\/h2>\n<h3>Open WebUI \u53ef\u4ee5\u63a5\u5165\u975e OpenAI \u6a21\u578b\u5417\uff1f<\/h3>\n<p>\u53ef\u4ee5\u3002\u53ea\u8981\u670d\u52a1\u7aef\u5b9e\u73b0\u4e86 OpenAI \u517c\u5bb9\u63a5\u53e3\uff0c\u901a\u5e38\u5c31\u80fd\u901a\u8fc7 OpenAI \u8fde\u63a5\u7c7b\u578b\u63a5\u5165\u3002\u6a21\u578b\u662f\u5426\u53ef\u7528\uff0c\u53d6\u51b3\u4e8e\u670d\u52a1\u7aef\u652f\u6301\u7684\u534f\u8bae\u3001\u6a21\u578b ID \u548c\u6743\u9650\u3002<\/p>\n<h3>Base URL \u5e94\u8be5\u586b\u5199\u5230\u54ea\u4e00\u7ea7\uff1f<\/h3>\n<p>\u901a\u5e38\u586b\u5199\u5230 API \u6839\u8def\u5f84\uff0c\u4f8b\u5982 <code>\/v1<\/code>\uff0c\u4e0d\u8981\u76f4\u63a5\u586b\u5199 <code>\/chat\/completions<\/code>\u3002\u4f46\u90e8\u5206\u670d\u52a1\u5546\u6709\u81ea\u5b9a\u4e49\u8def\u5f84\uff0c\u6700\u7ec8\u5e94\u4ee5\u5176\u63a5\u53e3\u6587\u6863\u4e3a\u51c6\u3002<\/p>\n<h3>\u4e3a\u4ec0\u4e48\u4fdd\u5b58\u540e\u770b\u4e0d\u5230\u6a21\u578b\uff1f<\/h3>\n<p>\u4f18\u5148\u68c0\u67e5 API Key\u3001<code>\/v1\/models<\/code> \u662f\u5426\u53ef\u8bbf\u95ee\uff0c\u4ee5\u53ca\u670d\u52a1\u5546\u662f\u5426\u8981\u6c42\u624b\u52a8\u6307\u5b9a Model IDs\u3002\u5982\u679c Docker \u4e2d\u90e8\u7f72\uff0c\u8fd8\u5e94\u68c0\u67e5\u5bb9\u5668\u662f\u5426\u80fd\u8bbf\u95ee\u76ee\u6807\u57df\u540d\u6216\u5bbf\u4e3b\u673a\u7aef\u53e3\u3002<\/p>\n<h3>Open WebUI \u80fd\u540c\u65f6\u914d\u7f6e\u591a\u4e2a\u63a5\u53e3\u5417\uff1f<\/h3>\n<p>\u53ef\u4ee5\u3002Open WebUI \u652f\u6301\u7ba1\u7406\u591a\u4e2a OpenAI \u517c\u5bb9\u8fde\u63a5\uff0c\u4f7f\u7528\u65f6\u518d\u4ece\u6a21\u578b\u9009\u62e9\u5668\u4e2d\u9009\u62e9\u5bf9\u5e94\u6a21\u578b\u3002\u591a\u8fde\u63a5\u573a\u666f\u4e0b\uff0c\u5efa\u8bae\u4f7f\u7528\u4e0d\u540c\u7684\u8fde\u63a5\u540d\u79f0\u6216\u6a21\u578b\u524d\u7f00\uff0c\u51cf\u5c11\u6a21\u578b\u540d\u79f0\u51b2\u7a81\u3002<\/p>\n<h3>\u914d\u7f6e\u540e\u80fd\u5426\u7ee7\u7eed\u4f7f\u7528\u672c\u5730 Ollama\uff1f<\/h3>\n<p>\u53ef\u4ee5\u3002Open WebUI \u53ef\u4ee5\u540c\u65f6\u7ba1\u7406\u672c\u5730\u6a21\u578b\u4e0e\u5916\u90e8 OpenAI \u517c\u5bb9\u63a5\u53e3\uff0c\u5177\u4f53\u663e\u793a\u6548\u679c\u53d6\u51b3\u4e8e\u5f53\u524d\u7248\u672c\u548c\u8fde\u63a5\u914d\u7f6e\u3002\u5b98\u65b9\u6587\u6863\u4e5f\u5c06 Ollama\u3001OpenRouter\u3001vLLM \u7b49\u517c\u5bb9\u670d\u52a1\u5f52\u5165\u81ea\u5b9a\u4e49 Base URL \u7684\u8fde\u63a5\u65b9\u5f0f\u3002(<a href=\"https:\/\/github.com\/open-webui\/docs\/blob\/main\/docs\/ecosystem\/computer\/ai\/connect-a-model.md\">github.com<\/a>)<\/p>\n<p><script type=\"application\/ld+json\">\n{\"@context\":\"https:\/\/schema.org\",\"@type\":\"Article\",\"author\":{\"@type\":\"Organization\",\"name\":\"nTokenX\"},\"dateModified\":\"2026-10-11\",\"datePublished\":\"2026-10-11\",\"description\":\"OpenWebUI\u914d\u7f6e\u81ea\u5b9a\u4e49OpenAI\u63a5\u53e3\u6559\u7a0b\uff0c\u8986\u76d6 Base URL\u3001API Key\u3001\u6a21\u578b ID\u3001Docker \u7f51\u7edc\u4e0e\u517c\u5bb9\u6027\u6392\u9519\uff0c\u5e76\u5ef6\u4f38\u5230\u591a\u6a21\u578b\u7edf\u4e00 API \u7684\u63a5\u5165\u65b9\u6cd5\uff0c\u7acb\u5373\u5b8c\u6210\u914d\u7f6e\u3002\",\"headline\":\"OpenWebUI\u914d\u7f6e\u81ea\u5b9a\u4e49OpenAI\u63a5\u53e3\u6559\u7a0b\",\"image\":\"https:\/\/ntokenx.com\/blog\/wp-content\/uploads\/2026\/10\/art-9862-cover.jpg\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"nTokenX\"}}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenWebUI\u914d\u7f6e\u81ea\u5b9a\u4e49OpenAI\u63a5\u53e3\u6559\u7a0b\uff0c\u8986\u76d6 Base URL\u3001API Key\u3001\u6a21\u578b ID\u3001Docker \u7f51\u7edc\u4e0e\u517c\u5bb9\u6027\u6392\u9519\uff0c\u5e76\u5ef6\u4f38\u5230\u591a\u6a21\u578b\u7edf\u4e00 API \u7684\u63a5\u5165\u65b9\u6cd5\uff0c\u7acb\u5373\u5b8c\u6210\u914d\u7f6e\u3002<\/p>\n","protected":false},"author":1,"featured_media":303,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-304","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=304"}],"version-history":[{"count":0,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/304\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/media\/303"}],"wp:attachment":[{"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ntokenx.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}