Using your agent in n8n or another OpenAI-compatible app: agent/ as the model

All in One AIAgents Through the API·· 7 views· 3 min read

An app that talks to OpenAI in the chat format also talks to your agents. It needs three things: our base address, your key and, in place of the model, agent/ followed by the agent id.

The three fields

Field What to enter
Base address (Base URL) https://api.interweb.co.mz/v1
Key (API Key) An API Center key with ai:read and ai:write
Model agent/ and the id, copied from Use through the API

Agents are used in the chat, POST /v1/chat/completions. If the app has an option to use another format, such as the Responses API, leave it off.

In n8n

1 Create the OpenAI credential with our address in Base URL, as in using All in One AI in n8n.
2 In the OpenAI Chat Model node, choose that credential. In the model field, switch from From List to ID and type agent/....
3 Leave the Use Responses API option off.

You can also use the HTTP Request node, with POST to https://api.interweb.co.mz/v1/chat/completions, the key in Bearer Auth and this JSON body:

{
"model": "agent/7c1e9a42-b35d8f06-a2c4e719-5d0b3f8e",
"messages": [
{ "role": "user", "content": "Which services do you offer on Saturdays?" }
],
"max_tokens": 400
}

Or our n8n node, with the AI operation Chat with a text model: in the model, type the agent id.

What the app can change

The model is always the agent's. The app's maximum tokens and temperature can lower the agent's, but never go above them. If the app has a system instructions field, leave it empty whenever you can: the agent's instructions and knowledge already go with every request, and extra text only spends tokens.

Testing

With a sandbox_ key, the answer is always "Resposta de teste (sandbox).": it confirms the address, the key and the id without spending. If the app tests the credential with the model list, your agents show up there first, with the id agent/....

A 404 model_not_found means a wrong id or an agent from another account; a 409 agent_paused, a paused agent. See agent errors through the API.

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

See All in One AI

SEE ALSO

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

Any app that accepts an OpenAI-compatible address: the base URL, the key and the model id

Our n8n node: domains, DNS, VPS, SMS, e-mail and AI in your workflows

Agent errors through the API: agent_paused and model_not_found

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.