Using All in One AI in n8n: the OpenAI credential with our address, or the HTTP Request node

All in One AI·· 3 views· 4 min read

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.
2 Have AI credits or an active Coding Plan in All in One AI.

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.

Want AI in your n8n workflows? See All in One AI.

See All in One AI

SEE ALSO

Calling an AI model from an n8n workflow: sort and summarise incoming messages

Sending SMS and checking domain names from n8n through our API

Using the OpenAI SDK with All in One AI: only the address and the key change

Securing n8n: access, credentials and exposed webhooks

All in One AI

RECOMMENDED PRODUCT

VPS server with root access

Resources of your own, the OS you choose, reinstall whenever you like. from 456,30 MT/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.