Integration
n8n with an OpenAI-compatible LLM API
n8n has native OpenAI nodes that accept a custom base URL. That is enough to run chat, classification and agent steps on LLMcode without a code node.
Updated
Credentials
Create an OpenAI credential in n8n and set the base URL to https://llmcode.io/v1. Paste the LLMcode key as the API key.
If your n8n version does not expose a base URL field on the OpenAI node, use an HTTP Request node with the same headers and JSON body.
- Base URL: https://llmcode.io/v1
- Header: Authorization: Bearer sk-llmcode-…
- Model: a published profile slug from /models
Practical limits
Use a dedicated key with a spend limit: workflow tools can retry and loop, and a spend ceiling keeps a runaway run bounded.
Set a timeout on the HTTP node and a max_tokens limit in the body. A workflow that retries without limits can spend a whole balance.
What to check after the first run
Open /account/logs: the request should appear with the model, token counts and the applied price. If the workflow retries, you will see several rows.
A 402 means the balance is empty; a 429 means the rate limit was hit. Both are visible in n8n as node errors.
Connect
POST https://llmcode.io/v1/chat/completions
Authorization: Bearer {{$env.LLMCODE_API_KEY}}
Content-Type: application/json
{"model":"deepseek-flash","messages":[{"role":"user","content":"Summarize the input"}],"max_tokens":300}Published model prices
USD per 1M tokens. The numbers come from the public catalog on every page rebuild — this is the sale price, not an estimate.
| Model | Input | Output | Cache |
|---|---|---|---|
| Claude Opus 5.5 | $2.70 | $8.00 | $0.14 |
| DeepSeek Flash | $0.50 | $2.00 | $0.01 |
| Claude Sonnet 5.5 | $1.33 | $6.67 | $0.07 |
| DeepSeek V4 Pro | $2.20 | $6.60 | $0.07 |
Top-up from $10, balance in USD. 1 USD = 1,000,000 UT. No subscription and no auto-charge.
Questions
Can n8n use the OpenAI node with LLMcode?
Yes, when the node allows a custom base URL. Otherwise an HTTP Request node with the same JSON body works.
Does streaming work in n8n?
Chat streaming is supported by the API; the node may buffer the response. For workflows, a non-streaming call is usually simpler.
How do I cap the cost?
Issue a dedicated key with a spend limit in UT and keep max_tokens small.