Skip to main content

Overview

n8n can use any OpenAI-compatible API. With NanoGPT, you get:
  • One API key for 50+ models (GPT-5.2, Claude Opus 4.5, Gemini 3 Flash Preview, and more)
  • The ability to switch models without changing your workflow logic
  • Unified billing across providers

Prerequisites

  • An n8n instance (desktop app, self-hosted, or n8n Cloud)
  • A NanoGPT account and API key from nano-gpt.com/api

Step 1: Get your NanoGPT API key

  1. Go to nano-gpt.com/api
  2. Click “Create New API Key”
  3. Copy the key (format: sk-nano-...)
  4. Store it securely, you will not be able to view it again

Step 2: Create OpenAI credentials in n8n

  1. Open your n8n instance
  2. Go to Credentials in the left sidebar
  3. Click + Add Credential
  4. Search for and select OpenAI
  5. Fill in the fields:
  1. Click Save

Step 3: Use NanoGPT in a workflow

  1. Go to Workflows and click + New Workflow
  2. Add an OpenAI node or Chat OpenAI node
  3. In the node settings:
    • Credential: Select your NanoGPT credential
    • Model: Enter the model name exactly (examples below)
    • Configure your prompt or messages
  4. Click Execute Node to test

Available models

Use any model listed on the NanoGPT pricing page. Enter the model name exactly as shown.

Example workflows

Basic chat completion

Document summarization

Multi-model comparison

Troubleshooting

Advanced: HTTP Request node

If you need full control over parameters, use the HTTP Request node:
  1. Add HTTP Request
  2. Set:
    • Method: POST
    • URL: https://nano-gpt.com/api/v1/chat/completions
    • Authentication: Header Auth
    • Header Name: Authorization
    • Header Value: Bearer sk-nano-YOUR-API-KEY
    • Body Content Type: JSON
    • Body: