The OpenAI nodes in n8n also work with All in One AI models: you only change the base address. There are two ways. The OpenAI credential with our address works with the OpenAI Chat Model node, which you add to the AI Agent. The HTTP Request node works for any request to the API. Both use the same Interweb key. If you are new to n8n, start with what n8n is.
Before you start
| 1 |
Create a key in the API Center with the ai:read and ai:write permissions. Use a sandbox_ key to check the setup without spending and a prod_ key to work. The fields are explained in creating an API key.
|
|
Way 1: the OpenAI credential with our address
| 1 |
In n8n, create a new credential of the OpenAI type.
|
|
| 2 |
In API Key, paste your prod_ key.
|
|
| 3 |
In Base URL, replace https://api.openai.com/v1 with https://api.interweb.co.mz/v1.
|
|
| 4 |
Save. n8n tests the credential by asking our address for the model list. With ai:read on the key, the test passes.
|
|
In the OpenAI Chat Model node, choose this credential. In the model field, switch from From List to ID and type the catalogue id, for example moonshotai/kimi-k2.7-code. The n8n list may include models that are not for chat, and n8n itself warns about it: with the id, you pick the right one. Leave Use Responses API off.
For the AI Agent node, add the OpenAI Chat Model and at least one tool, as n8n requires. Use a model that supports tools: moonshotai/kimi-k2.7-code, zai-org/glm-5.2, deepseek-ai/deepseek-v4-pro or deepseek-ai/deepseek-v4-flash.
Way 2: the HTTP Request node
| 1 |
Add an HTTP Request node. In Method, choose POST and, in URL, type https://api.interweb.co.mz/v1/chat/completions.
|
|
| 2 |
In Authentication, choose Generic Credential Type and then Bearer Auth. Create the credential with the key in Bearer Token.
|
|
| 3 |
Turn on Send Body, with Body Content Type set to JSON and Specify Body set to Using JSON, and paste:
|
|
{
"model": "deepseek-ai/deepseek-v4-flash",
"messages": [
{ "role": "user", "content": "Sum up this message in one sentence: ..." }
],
"max_tokens": 200
}
The answer text is in choices[0].message.content. You can also paste the curl example from the AI docs with Import cURL, in the node itself: n8n fills in the fields, but it overwrites what was there.
What it costs
Each workflow run that calls the AI spends credits, at the model's price, or Coding Plan points on the plan's models. max_tokens limits the size of the answer and lowers the credit reservation. With a sandbox_ key, the answer is always "Resposta de teste (sandbox)." and nothing is spent: use it to build the workflow. A full example is in calling an AI model from an n8n workflow.
|
The key stays in the n8n credentials, never in a text field of the workflow. Anyone who exports the workflow gets the text, but not the credentials. See also how to secure n8n.
|