{"id":489,"date":"2026-11-20T10:02:23","date_gmt":"2026-11-20T02:02:23","guid":{"rendered":"https:\/\/qoraapi.com\/blog\/n8n-openai-compatible-api\/"},"modified":"2026-11-20T10:02:23","modified_gmt":"2026-11-20T02:02:23","slug":"n8n-openai-compatible-api","status":"publish","type":"post","link":"https:\/\/qoraapi.com\/blog\/n8n-openai-compatible-api\/","title":{"rendered":"n8n OpenAI Compatible API: Setup Guide for Custom Base URL (2026)"},"content":{"rendered":"<div class=\"qora-short-answer\">\n<p><strong>Short answer:<\/strong> To use an OpenAI-compatible API in n8n, create an <strong>OpenAI<\/strong> credential, set its <strong>Base URL<\/strong> to <code>https:\/\/qoraapi.com\/v1<\/code>, paste your Qora API key, and pick the model by ID in the OpenAI Chat Model node. As of November 2026, Qora API serves <code>deepseek\/deepseek-v4.1-flash<\/code> at $0.15 input \/ $0.45 output per 1M tokens, so a typical 2,000-in \/ 500-out workflow run costs about $0.0005.<\/p>\n<\/div>\n<p>n8n has no separate &#8220;OpenAI-compatible&#8221; node. Instead, its built-in OpenAI credential and OpenAI Chat Model sub-node accept a custom base URL, so any gateway that speaks the OpenAI Chat Completions format works. This guide shows the exact fields, a test call, the &#8220;Use Responses API&#8221; setting, how to pick non-OpenAI models, and the cost per run.<\/p>\n<h2>How do I connect n8n to an OpenAI-compatible endpoint?<\/h2>\n<ol>\n<li>Get an API key from <a href=\"\/register\">Qora API<\/a> (minimum top-up is $50; new users can ask for a $5 trial via X <a href=\"https:\/\/x.com\/QoraAPI\">@QoraAPI<\/a> or support@qoraapi.com).<\/li>\n<li>In n8n open <strong>Credentials \u2192 Create credential \u2192 OpenAI<\/strong>.<\/li>\n<li>Fill in: <strong>API Key<\/strong> = your Qora key; <strong>Base URL<\/strong> = <code>https:\/\/qoraapi.com\/v1<\/code> (include <code>\/v1<\/code>, no trailing slash). Leave Organization ID empty.<\/li>\n<li>Save. n8n runs a credential test; if it complains, ignore it and test with a node instead (see below), because some gateways do not expose every OpenAI utility endpoint the test uses.<\/li>\n<li>Add an <strong>AI Agent<\/strong> or <strong>Basic LLM Chain<\/strong> node, attach an <strong>OpenAI Chat Model<\/strong> sub-node and select the credential.<\/li>\n<\/ol>\n<p>The OpenAI credential is documented in the <a href=\"https:\/\/docs.n8n.io\/integrations\/builtin\/credentials\/openai\/\" rel=\"nofollow noopener\" target=\"_blank\">n8n OpenAI credentials docs<\/a>; the node is described on the <a href=\"https:\/\/docs.n8n.io\/integrations\/builtin\/cluster-nodes\/sub-nodes\/n8n-nodes-langchain.lmchatopenai\/\" rel=\"nofollow noopener\" target=\"_blank\">OpenAI Chat Model page<\/a>.<\/p>\n<h2>Which model ID do I enter in the OpenAI Chat Model node?<\/h2>\n<p>Switch the Model field from <em>From list<\/em> to <strong>By ID<\/strong> and type the Qora model ID. The dropdown is loaded dynamically from the endpoint and may not show every model, so By ID is the reliable route. Examples: <code>deepseek\/deepseek-v4.1-flash<\/code>, <code>gemini-3.8-flash<\/code>, <code>glm-5.2<\/code>. The full list is on <a href=\"\/pricing\">Qora&#8217;s pricing page<\/a>.<\/p>\n<h2>How much does an n8n workflow cost with Qora API?<\/h2>\n<p>As of November 2026, these Qora API prices come from the live <a href=\"\/pricing\">pricing page<\/a> (per 1M tokens). Official prices are from each vendor&#8217;s pricing page and were checked in November 2026.<\/p>\n<table>\n<thead>\n<tr>\n<th>Model (ID)<\/th>\n<th>Qora input \/ output<\/th>\n<th>Official input \/ output<\/th>\n<th>Cost per 1,000 runs*<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>DeepSeek V4.1 Flash (<code>deepseek\/deepseek-v4.1-flash<\/code>)<\/td>\n<td>$0.15 \/ $0.45<\/td>\n<td>$0.30 \/ $1.20<\/td>\n<td>$0.53<\/td>\n<\/tr>\n<tr>\n<td>Gemini 3.8 Flash (<code>gemini-3.8-flash<\/code>)<\/td>\n<td>$0.15 \/ $0.90<\/td>\n<td>$0.75 \/ $3.75<\/td>\n<td>$0.75<\/td>\n<\/tr>\n<tr>\n<td>GLM 5.2 (<code>glm-5.2<\/code>)<\/td>\n<td>$0.42 \/ $1.32<\/td>\n<td>$1.40 \/ $4.40<\/td>\n<td>$1.50<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>*Assumes 2,000 input and 500 output tokens per run, no caching. Qora prices are &#8220;up to 70% off&#8221; official; the discount differs per model. Details: <a href=\"\/models\/deepseek-v4-1-flash-api\">DeepSeek V4.1 Flash<\/a>, <a href=\"\/models\/gemini-3-8-flash-api\">Gemini 3.8 Flash<\/a>, <a href=\"\/models\/glm-5-2-api\">GLM 5.2<\/a>.<\/p>\n<h2>How do I test the endpoint before building the workflow?<\/h2>\n<p>Use an <strong>HTTP Request<\/strong> node (or a terminal) first. If this works, the n8n credential will too.<\/p>\n<pre><code>curl https:\/\/qoraapi.com\/v1\/chat\/completions \\\n  -H \"Authorization: Bearer YOUR_QORA_KEY\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\n    \"model\": \"deepseek\/deepseek-v4.1-flash\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Reply with the word ok\"}]\n  }'<\/code><\/pre>\n<p>In n8n, the equivalent HTTP Request node settings are: Method <code>POST<\/code>, URL <code>https:\/\/qoraapi.com\/v1\/chat\/completions<\/code>, Authentication <em>Header Auth<\/em> with <code>Authorization: Bearer YOUR_QORA_KEY<\/code>, Body type JSON with the payload above.<\/p>\n<h2>Should I turn on &#8220;Use Responses API&#8221; in n8n?<\/h2>\n<p>Leave it off unless you need OpenAI built-in tools. The OpenAI Chat Model node defaults to the Chat Completions API (<code>\/v1\/chat\/completions<\/code>), which every OpenAI-compatible gateway supports. The &#8220;Use Responses API&#8221; toggle switches the node to <code>\/v1\/responses<\/code> and unlocks Web Search, File Search and Code Interpreter, which are OpenAI-hosted tools and only make sense on models that provide them. If a non-OpenAI model returns an error, check this toggle first.<\/p>\n<h2>What if n8n shows &#8220;Could not retrieve models&#8221; or a 404?<\/h2>\n<ul>\n<li><strong>404 \/ not found:<\/strong> the Base URL is missing <code>\/v1<\/code> or has a typo. It must be exactly <code>https:\/\/qoraapi.com\/v1<\/code>.<\/li>\n<li><strong>401 \/ invalid key:<\/strong> paste the key without the word &#8220;Bearer&#8221; and without spaces.<\/li>\n<li><strong>Empty model list:<\/strong> use Model \u2192 By ID.<\/li>\n<li><strong>Model not found:<\/strong> copy the ID exactly from the pricing page; DeepSeek IDs include the <code>deepseek\/<\/code> prefix.<\/li>\n<li><strong>Self-hosted n8n cannot connect:<\/strong> make sure the server can reach the internet over HTTPS. Qora API is for users outside mainland China only.<\/li>\n<\/ul>\n<h2>Can I use Claude or Gemini models in n8n through the same credential?<\/h2>\n<p>Yes for chat. Qora exposes Claude, Gemini and other models through the OpenAI-compatible <code>\/v1\/chat\/completions<\/code> endpoint, so the same credential and node work; just change the model ID. Native Anthropic features that need the <code>\/v1\/messages<\/code> format use n8n&#8217;s Anthropic credential instead, with its base URL set to <code>https:\/\/qoraapi.com<\/code>. See <a href=\"\/blog\/claude-api-pricing\/\">Claude API pricing<\/a> for current Claude prices.<\/p>\n<h2>Other tools that use the same base URL<\/h2>\n<p>The same <code>https:\/\/qoraapi.com\/v1<\/code> base URL works in editors and agents: see the guides for <a href=\"\/blog\/opencode-custom-provider\/\">OpenCode<\/a> and the <a href=\"\/blog\/zed-openai-compatible-provider\/\">Zed editor<\/a>.<\/p>\n<h2>FAQ: n8n with OpenAI-compatible APIs<\/h2>\n<h3>Does n8n support OpenAI-compatible APIs?<\/h3>\n<p>Yes. n8n&#8217;s OpenAI credential accepts a custom Base URL, so any OpenAI-compatible gateway such as Qora API (<code>https:\/\/qoraapi.com\/v1<\/code>) works with the OpenAI Chat Model, AI Agent and Basic LLM Chain nodes.<\/p>\n<h3>What is the base URL for Qora API in n8n?<\/h3>\n<p>The base URL is <code>https:\/\/qoraapi.com\/v1<\/code>. Put it in the Base URL field of the n8n OpenAI credential.<\/p>\n<h3>Why does the n8n model dropdown not show my model?<\/h3>\n<p>The dropdown loads models dynamically and may be incomplete on gateways. Switch the Model field to By ID and enter the exact ID, for example <code>deepseek\/deepseek-v4.1-flash<\/code>.<\/p>\n<h3>How much does it cost to run an n8n AI workflow on DeepSeek V4.1 Flash?<\/h3>\n<p>About $0.53 per 1,000 runs at 2,000 input and 500 output tokens each, based on Qora&#8217;s $0.15 \/ $0.45 per 1M tokens price in November 2026.<\/p>\n<h3>How do I get a Qora API key?<\/h3>\n<p>Register at <a href=\"\/register\">qoraapi.com\/register<\/a>. The minimum top-up is $50, and new users can request a $5 trial via X @QoraAPI or support@qoraapi.com.<\/p>\n<p><a href=\"\/register\"><strong>Create your Qora API key<\/strong><\/a> and point n8n at <code>https:\/\/qoraapi.com\/v1<\/code>. Full prices are on the <a href=\"\/pricing\">pricing page<\/a>. This guide has not been tested against your specific n8n version; field names can vary slightly between releases.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Short answer: To use an OpenAI-compatible API in n8n, create an OpenAI credential, set its Base URL to https:\/\/qoraapi.com\/v1, paste your Qora API key, and pick the model by ID in the OpenAI Chat Model node. As of November 2026, Qora API serves deepseek\/deepseek-v4.1-flash at $0.15 input \/ $0.45 output per 1M tokens, so a [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-489","post","type-post","status-publish","format-standard","hentry","category-ai-api"],"_links":{"self":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/posts\/489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/comments?post=489"}],"version-history":[{"count":0,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/posts\/489\/revisions"}],"wp:attachment":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/media?parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/categories?post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/tags?post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}