1
Add an OpenAI Chat Model node
Open your workflow in n8n and add an OpenAI Chat Model node. You’ll find it in the node panel under AI → Language Models.
2
Create new OpenAI credentials
In the node’s credential selector, choose Create new credential and fill in the following fields:
Save the credential — you can reuse it across all OpenAI-compatible nodes in your instance.
3
Enter your model ID
In the Model field of the Chat Model node, type the Meliai model ID you want to use. You can find available model IDs in the models reference.
4
Connect to an AI Agent or Chain node
Wire the Chat Model node into an AI Agent, Basic LLM Chain, or any other AI orchestration node in your workflow. The Chat Model node acts as the language model backend for whichever orchestrator you choose.
5
Test and activate your workflow
Use Execute Workflow to run a test with sample input. Once the output looks correct, toggle the workflow to Active so it runs on your configured trigger.
All n8n AI features work with Meliai through the OpenAI-compatible endpoint — including AI Agent, Basic LLM Chain, Summarization Chain, Question and Answer Chain, and Information Extractor. Any node that accepts an OpenAI Chat Model credential will work.
LangChain
Connect LangChain chains and agents to Meliai using
ChatOpenAI with a custom base_url.Vercel AI SDK
Route Next.js streaming handlers through Meliai using the
@ai-sdk/openai provider.