Templates / Create OpenAI-compatible API using GitHub models for free AI access

Create OpenAI-compatible API using GitHub models for free AI access

Ready for 3.0

by Jimleuk ✓ · 7,296 views · created 2025-05-19 · Engineering, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 12 nodes and runs when a chat message arrives (plus 2 other triggers). Along the way it connects OpenAI Chat Model. It also calls models.github.ai over HTTP.

How it runs

Trigger: When a chat message arrives (plus 2 other triggers).

  1. Powered By Github Models (Basic LLM Chain): sends a prompt to an LLM, with model: n8n Webhooks
  2. Github Models (HTTP Request): calls models.github.ai
  3. Github Chat Completions (HTTP Request): calls models.github.ai (POST)
  4. Aggregate: combines items into one
  5. Is Agent? (If): checks a condition and branches into true / false
  6. Models Response (Respond to Webhook): sends the response back to the webhook caller
  7. Agent Response (Respond to Webhook): sends the response back to the webhook caller
  8. Chat Response (Respond to Webhook): sends the response back to the webhook caller

Services it uses

OpenAI Chat Model

HTTP calls to: models.github.ai

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (8)

From the author

This n8n template shows you how to connect Github's Free Models to your existing n8n AI workflows. Whilst it is possible to use HTTP nodes to access Github Models, The aim of this template is to use it with existing n8n LLM nodes - saves the trouble of…

Excerpt from Jimleuk's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.