FM
FlowMarket
DevOps & GitHub Advanced ⚡ 17 n8n Nodes

Create OpenAI compatible API using GitHub models for free AI acc

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 M...

🔌 Nodes & Integrations Used (4)

HTTP Request Lm Chat Open Ai Chain Llm Chat Trigger

📖 Implementation & Setup Guide

This n8n template shows you how to connect [Github's Free Models](https://docs.github.com/en/github-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 refactoring!

Please note, Github states their model APIs are not intended for production usage! If you need higher rate limits, you'll need to use a paid service.

How it works * The approach builds a custom OpenAI compatible API around the Github Models API - all done in n8n! * First, we attach an OpenAI subnode to our LLM node and configure a new OpenAI credential. * Within this new OpenAI credential, we change the "Base URL" to point at a n8n webhook we've prepared as part of this template. * Next, we create 2 webhooks which the LLM node will now attempt to connect with: "models" and "chat completion". * The "models" webhook simply calls the Github Model's "list all models" endpoint and remaps the response to be compatible with our LLM node. * The "Chat Completion" webhook does a similar task with Github's Chat Completion endpoint.

How to use * Once connected, just open chat and ask away! * Any LLM or AI agent node connected with this custom LLM subnode will send requests to the Github Models API. Allowing your to try out a range of SOTA models for free.

Requirements * Github account and credentials for access to Models. If you've used the Github node previously, you can reuse this credential for this template.

Customising this workflow * This template is just an example. Use the custom OpenAI credential for your other workflows to test Github models.

References * [https://docs.github.com/en/github-models/prototyping-with-ai-models](https://docs.github.com/en/github-models/prototyping-with-ai-models) * [https://docs.github.com/en/github-models](https://docs.github.com/en/github-models)

⚡ How to import this workflow into n8n:

  1. Click the Direct Download JSON button above to save Create_OpenAI_compatible_API_using_GitHub_models_for_free_AI_acc.json.
  2. Log in to your n8n Cloud or self-hosted n8n instance.
  3. In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
  4. Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
  5. Click Execute Workflow to test and switch to Active!

Related DevOps & GitHub Workflows

View All in DevOps & GitHub →