Steps
How we tested, and what is real
We ran 17 workflows (about 25 executions) with the OpenAI node, operation Message a model (node version 2.3, which calls OpenAI's Responses API), on n8n 2.43.7 with
n8n execute. To make OpenAI fail on purpose (no credits, rate limits, wrong model) we set the OpenAI credential's Base URL to a small local stand-in that logs every request and answers with the error bodies OpenAI documents. So what n8n sends and how it reports errors is real; the OpenAI answers are simulated.Reply is undefined? The text moved to output[0].content[0].text
With Simplify Output on (the default), the item looks like
{"output": [{"type": "message", "status": "completed", "content": [{"type": "output_text", "text": "..."}]}]}. Read the reply with{{ $json.output[0].content[0].text }}. Expressions copied from older workflows, such as$json.textor$json.message.content, return nothing. Turn Simplify Output off to also getusagetoken counts andincomplete_details."Bad request - please check your parameters" and other generic top lines
n8n replaces OpenAI's message with a short generic one. A prompt too long for the model and a text field over the size limit both showed only
Bad request - please check your parameters. A wrong key showedAuthorization failed - please check your credentials, and a model name that does not exist showedThe resource you are requesting could not be found. In every case OpenAI's real reason, such asYour input exceeds the context window of this modelorThe model `gpt-nope` does not exist or you do not have access to it., was on the next line of the error (400 - {"error": ...}). Read that line first."Insufficient quota detected" is billing, not speed
Insufficient quota detected. Learn more about resolving this issueis n8n's text for OpenAI'sinsufficient_quota:You exceeded your current quota, please check your plan and billing details.The API account has no credits left. Waiting or retrying does not help; add credits on platform.openai.com (a ChatGPT Plus subscription is billed separately and does not count). n8n sent one request and stopped."OpenAI: Rate limit reached" is not retried
When our stand-in answered 429
rate_limit_exceededwithPlease try again in 20s., n8n sent exactly one request and failed withOpenAI: Rate limit reached. Turn on Settings > Retry On Fail with a wait of 20000 ms or more, or space items out with Loop Over Items and a Wait node. Options compared in n8n 429 rate limits.Custom Base URL: it must end in /v1
For OpenAI-compatible servers (LiteLLM, Ollama, OpenRouter, a company proxy) the credential's Base URL needs the
/v1part, for examplehttp://localhost:11434/v1. Without it n8n posted to/responsesand got the genericThe resource you are requesting could not be found. A server that is down givesThe service refused the connection - perhaps it is offline. Also check that your server supports the Responses API, which this operation calls.Replies cut off with no error: Maximum Number of Tokens
When you add the Maximum Number of Tokens option it shows 16, and n8n sent
max_output_tokens: 16. The reply was cut after a few words and the node still succeeded. With Simplify Output on, the only sign wasoutput[0].statusset toincomplete. Remove the option or set a real limit, such as 1000. With Output Format JSON Object, a valid JSON reply is parsed into an object, but a cut-off one silently stays a broken string, so.text.summaryis undefined further on. An invalid JSON Schema fails before sending withFailed to parse schema.Many items: one failure stops the rest
With 3 items and a bad item 2, item 1 was sent and item 3 was never sent. With Settings > On Error > Continue (using regular output) all 3 were sent and item 2 became
{"error": "Bad request - please check your parameters"}, without OpenAI's reason. Careful: in Continue mode aninsufficient_quotaerror readThe service is receiving too many requests from you, which looks like a speed limit but is a billing problem. An empty prompt fails before any request withA non-empty prompt is required.
All test results
Left: what we did with the OpenAI node (Text > Message a model, node version 2.3). Right: what n8n did (real) and the answer from our OpenAI stand-in (simulated, see the first step).
| Test | Result |
|---|---|
Say hello, defaults (Simplify Output on) | Worked. The reply text was at $json.output[0].content[0].text, not at $json.text or $json.message.content |
| Same with Simplify Output off | Full response: id, status, incomplete_details, usage token counts, and output |
| Empty prompt, or an expression that resolves to empty | Failed before any request: A non-empty prompt is required. |
Wrong API key (401 invalid_api_key) | Authorization failed - please check your credentials; OpenAI's Incorrect API key provided only on the 401 line below |
No credits on the API account (429 insufficient_quota) | Insufficient quota detected. Learn more about resolving this issue; one request, no retry |
Rate limited (429 rate_limit_exceeded, body says try again in 20s) | OpenAI: Rate limit reached; exactly one request, not retried |
Model name that does not exist (404 model_not_found) | Generic The resource you are requesting could not be found; the model name only on the 404 line |
Base URL without /v1 | Request went to /responses; same generic The resource you are requesting could not be found |
| Base URL not reachable | The service refused the connection - perhaps it is offline |
Prompt too long for the model (400 context_length_exceeded) | Generic Bad request - please check your parameters; the real reason only on the 400 line |
| Another 400 (text field too long) | Same generic Bad request - please check your parameters |
| Output Format JSON Object, valid JSON reply | n8n parsed it: content[0].text was an object, so .text.summary worked |
| JSON Object, reply cut off (status incomplete) | No error. text stayed a truncated string, .text.summary undefined downstream |
| Maximum Number of Tokens option added, left at its default 16 | Sent as max_output_tokens: 16; reply cut to The quick brown fox jum, node succeeded, only output[0].status said incomplete |
| JSON Schema option with invalid schema JSON | Failed before any request: Failed to parse schema |
| 3 items, item 2 fails, default settings | Item 1 sent, item 2 failed, item 3 never sent |
| Same, On Error set to Continue (regular output) | All 3 sent; item 2 became {"error": "Bad request - please check your parameters"}, OpenAI's reason lost |
Continue (regular output) + insufficient_quota | Error item said The service is receiving too many requests from you, not insufficient quota |
Code node: get the text and catch cut-off replies
Put this after the OpenAI node with Simplify Output on. It throws when a reply was cut off, instead of passing half an answer on (written from the output shape we saw; this exact snippet was not run):
return $input.all().map(i => {
const msg = (i.json.output || []).find(o => o.type === 'message') || {};
if (msg.status === 'incomplete') throw new Error('OpenAI reply was cut off: raise Maximum Number of Tokens');
const text = ((msg.content || [])[0] || {}).text;
return { json: { text } };
});Checklist
- Read the reply from
{{ $json.output[0].content[0].text }}in node version 2.x. - Look at the second line of the error: that is OpenAI's real reason.
insufficient_quota: add credits to the API account at platform.openai.com; a ChatGPT subscription does not cover the API.Rate limit reached: Retry On Fail with a wait of 20000 ms or more, or Loop Over Items plus a Wait node.- Custom Base URL (proxy, LiteLLM, Ollama) ends in
/v1. - Remove Maximum Number of Tokens or set it well above 16; check
output[0].status. - On Error Continue for many items, and log the
errorfield.
Good to know
- Embeddings and RAG errors (empty text, 404 on /embeddings, empty store) are in n8n Simple Vector Store not working.
- Same errors in the Basic LLM Chain, plus No prompt specified and fallback traps: n8n Basic LLM Chain not working.
- Summarizing long text with a model instead? See n8n Summarization Chain not working (output keys, prompt braces, call count).
- Routing items into categories with a model? Dropped items, two-branch items and the fallback key are in n8n Text Classifier not working.
- Extracting names, dates or amounts from text with the Information Extractor and an OpenAI model? See n8n Information Extractor not working.
- Asking for JSON through an output parser instead?
Model output doesn't fit required formatand the hiddenoutputwrapper are in n8n Structured Output Parser not working. - Running OpenAI inside an AI Agent node instead?
No prompt specified,Max iterations (10) reachedand Simple Memory errors are in n8n AI Agent node not working. - The node sent
store: trueon every request in our runs; the Store option controls it. - Calling OpenAI with an HTTP Request node instead? Its errors are decoded in n8n HTTP Request node errors.
- Pacing options for 429s are compared in n8n 429 rate limits.
- Want the cost of each call? See track OpenAI API cost per call in n8n.
undefinedafter the node usually means the old v1 path in an expression: n8n expressions returning undefined.- Every error text from our n8n guides is in the n8n error message index.
What we did not test
The real api.openai.com (answers came from our stand-in, built from OpenAI's documented error bodies), other operations (images, audio, assistants, files), tools and built-in tools, the AI Agent and OpenAI Chat Model nodes, the editor's own error panel, and n8n Cloud.
Start from a working agent
FAQ
Why is the output of the n8n OpenAI node undefined?
In node version 2.x (Message a model) the reply is at $json.output[0].content[0].text. Older expressions like $json.text or $json.message.content point at fields that no longer exist.
What does "Insufficient quota detected" mean in n8n?
OpenAI says the API account has no credits or hit its spending limit. It is a billing problem, not a speed limit: add credits on platform.openai.com. A ChatGPT subscription does not pay for API calls.
Does the n8n OpenAI node retry on "Rate limit reached"?
Not in our n8n 2.43.7 tests: one 429 failed the node at once. Turn on Retry On Fail with a wait of 20 seconds or more, or space items with a Wait node.
What does "Bad request - please check your parameters" mean in the n8n OpenAI node?
OpenAI rejected the request with a 400 and n8n shows a generic line. The real reason, often a prompt longer than the model's context window, is on the next line of the error.
Why are OpenAI replies cut off in n8n?
The Maximum Number of Tokens option starts at 16 when you add it. The reply stops after a few words and the node does not fail. Remove the option or raise it.
Why does n8n say "The resource you are requesting could not be found" for OpenAI?
Either the model name does not exist for your key, or a custom Base URL is missing /v1. Check the 404 line of the error to see which.
Related guides
- n8n AI Agent node not working? 18 tests, every error decoded
- n8n Telegram node not working? 20 tests, every error decoded
- n8n Supabase node errors: credentials, RLS and filter fixes, 41 runs
- n8n Information Extractor not working? 27 tests, every error decoded
- n8n Basic LLM Chain not working? 25 tests, every error decoded
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes