How to Integrate OpenAI (GPT) with n8n Using Lunos for free!

How to Integrate OpenAI (GPT) with n8n Using Lunos for free!

Lunos is a powerful platform for working with AI APIs like OpenAI, making it easy for developers and automation builders to leverage LLMs in their workflows including through tools like n8n.

In this tutorial, you’ll learn how to use Lunos together with n8n to automate workflows that interact with OpenAI models without needing a ChatGPT subscription or advanced backend setup.

What is n8n?

n8n (pronounced "n-eight-n") is a source-available, extensible workflow automation tool. It lets you build custom workflows by connecting apps and APIs through modular components called nodes. Each node represents a single action such as fetching data, sending a request, or calling an AI model.

With its drag-and-drop, no-code interface, n8n supports hundreds of integrations and is ideal for automating repetitive tasks, data syncs, and AI-powered processes including those powered by Lunos.

Why Use Lunos with n8n?

Lunos simplifies access to AI services like OpenAI with:

  • ✅ A free-daily API for OpenAI (GPT-4.1-mini)
  • ✅ Fast, reliable proxy with daily free credits
  • ✅ Easy key management and usage tracking
  • ✅ No need for a ChatGPT Plus subscription

Step-by-Step Guide to Connect OpenAI via Lunos in n8n

1. Get Your Lunos OpenAI API Key

  • Sign up at lunos.tech
  • Navigate to the API Keys section in your dashboard
  • Copy your key, this will be used as the OpenAI API key in n8n

💡 Lunos provides free daily usage credits so you can start testing right away.

API key created popup

2. Create Your n8n Workflow

  • Open your n8n instance (self-hosted or via n8n.cloud)
  • Click “New Workflow”
  • Add the OpenAI node (native to n8n) to your canvas

3. Configure OpenAI Credentials

  • Go to Credentials → OpenAI
  • Create a new credential
  • Paste your Lunos-provided API key as the OpenAI API key
  • Edit base url to https://api.lunos.tech/v1

Lunos acts as a drop-in replacement for direct OpenAI keys.

4. Set Up the OpenAI Node

  • Select your desired model, to use free GPT model, use gpt-4.1-mini
  • Define your prompt input (e.g., from a previous node or static text)
  • Set optional parameters: temperature, max tokens, top_p, etc.

5. Use Lunos Within the Workflow

If your use case includes more AI-related interactions, like chaining outputs to webhooks, databases, or other Lunos services you can add custom HTTP Request nodes to call additional endpoints from Lunos or other APIs.

6. Run and Test

  • Save and execute your workflow
  • Observe outputs from the OpenAI node (response from GPT)
  • Debug and iterate as needed using n8n's built-in run logs