On this page
Looking for a GitHub Models API key? There is nothing left to use it on. A new personal access token, a fine-grained token or a
GITHUB_TOKEN with different permissions cannot reach a service that has been switched off.What to use instead: GitHub points you to Microsoft Foundry (paid, Azure subscription) for model access and GitHub Copilot for AI inside GitHub. If you came for a free OpenAI-compatible endpoint, the closest options are Groq's free API and OpenRouter's free models. Both use open-weight models; neither gives you GPT-4o for free.
What the Endpoint Returns Today
The host models.github.ai still resolves and still answers, so broken applications may not fail the way you expect. You can check it yourself without a token:
curl -i https://models.github.ai/catalog/models
As of 2026-09-29, that returns HTTP 200 with content-type: text/plain and a body of just OK. We got the same response from /, from /catalog/models and from a POST to /inference/chat/completions, both without a token and with an invalid one. So the placeholder does not depend on authentication and is not an auth error. It is not a working API either: there is no JSON, no model list and no completion.
That is a change from a month earlier. On 2026-08-28 (unauthenticated) and 2026-08-31 (our automated benchmark, with a real token), the same endpoint returned HTTP 410 Gone with this body:
{"error":{"code":"github_models_retirement_brownout",
"message":"GitHub Models is temporarily unavailable as part of a scheduled retirement brownout."}}
The practical point for monitoring: a status-code check alone now reports success. A dead integration shows up as a body that is not JSON. It is not a timeout and no longer a 4xx.
Timeline
| Date | What happened | Source |
|---|---|---|
| 2026-06-16 | New organizations and enterprises without existing usage lose access, on free and paid plans | GitHub changelog |
| 2026-07-01 | GitHub announces full retirement for July 30 | GitHub changelog |
| 2026-07-16 | First scheduled brownout: requests return errors, then service is restored | Same announcement |
| 2026-07-23 | Second scheduled brownout | Same announcement |
| 2026-07-30 | Full retirement: playground, catalog, inference API and BYOK all disabled | GitHub changelog |
| 2026-08-28 / 08-31 | Our checks: HTTP 410 with the github_models_retirement_brownout error | Our test |
| 2026-09-29 | Our check: HTTP 200, plain-text OK on every path, with or without a token | Our test |
Where to Go Instead
There is the migration GitHub recommends, and there is the one you probably want if you used GitHub Models because it was free.
If you need the same models (paid)
GitHub's retirement notice names Microsoft Foundry (called Azure AI Foundry in the June notice and in GitHub's docs) as the place for "a broad model catalog". It runs on an Azure subscription and is not free. This is the right path if GitHub Models was serving real traffic.
For AI features inside GitHub itself, such as code review, chat or agent workflows, the same notice points to GitHub Copilot, which gives access to a range of models under a Copilot plan. It is not a general-purpose inference API you can call from your own app the way GitHub Models was.
If you need free and OpenAI-compatible
No free tier anywhere still hands out GPT-4o. That was the unusual thing about GitHub Models, and it is the part with no replacement. What you can get for $0. Limits are from each provider's own docs as of 2026-08-28, and Groq model IDs were re-checked 2026-09-29. For measured speed, see our free AI API speed test.
| Provider | Free models | Free limits | Card required |
|---|---|---|---|
| Groq | gpt-oss-120b, gpt-oss-20b, qwen3.8-27b | 30 RPM, 1,000 RPD, 8K TPM; 200K TPD on gpt-oss | No |
| OpenRouter | 21 free models incl. GLM 5.2, Nemotron 3 | 20 RPM, 50 RPD — 1,000 RPD after a one-time $10 purchase | No |
| Cloudflare Workers AI | Open-weight catalog | Daily neuron allocation | No |
| NVIDIA NIM | 102 models in the public catalog | Credit-based | No |
Migrating the Code
GitHub Models was OpenAI-compatible, so in most cases the migration is two lines. The old setup:
from openai import OpenAI
client = OpenAI(
base_url="https://models.inference.ai.azure.com", # retired 2026-07-30
api_key=os.environ["GITHUB_TOKEN"],
)
resp = client.chat.completions.create(model="gpt-4o", messages=[...])
The same code pointed at Groq's free tier:
from openai import OpenAI
client = OpenAI(
base_url="https://api.groq.com/openai/v1",
api_key=os.environ["GROQ_API_KEY"],
)
resp = client.chat.completions.create(
model="openai/gpt-oss-120b",
messages=[{"role": "user", "content": "Summarise this changelog."}],
)
print(resp.choices[0].message.content)
The request and response shapes are identical. What changes is the model string and the ceiling: Groq's free plan allows 1,000 requests a day but only 200,000 tokens a day, so a 2,000-token exchange exhausts the day at around 100 calls — well before the request cap.
If You Were Using It in CI
The most common GitHub Models pattern was a workflow that called the API with the built-in GITHUB_TOKEN — no secret to manage, because the token was already there. Nothing replaces that convenience: every alternative needs a real API key stored as a repository secret.
Audit your workflows for the old base URLs (models.inference.ai.azure.com and models.github.ai). Since the endpoint now answers with HTTP 200 and a plain-text OK, a step that only checks the exit code of curl or the HTTP status will pass while doing nothing.
Frequently Asked Questions
Is GitHub Models really gone, or just paused?
Gone. GitHub's documentation states it was fully retired on July 30, 2026. In August the endpoint still returned a "temporarily unavailable" brownout message, which read as if the service might come back. By late September it had been replaced with a plain OK placeholder. Neither means the service is returning.
Will a new GitHub token or API key fix it?
No. GitHub Models never had separate API keys: it authenticated with a GitHub personal access token or the Actions GITHUB_TOKEN. The retirement switched off the service itself, so no token, scope or plan change restores access. You need a key from a different provider.
Can I still get free GPT-4o anywhere?
Not through a free API tier. GitHub Models was the outlier in offering frontier closed models at no cost. Free tiers today are open-weight models — gpt-oss, Qwen, GLM, Nemotron, Llama — served by providers such as Groq, OpenRouter and Cloudflare.
What is the official replacement?
GitHub recommends Microsoft Foundry (Azure AI Foundry) for model access and GitHub Copilot for AI workflows on GitHub. Foundry runs on an Azure subscription, not a free GitHub account.
My app still "works" — why?
Check what it is actually receiving. In August the endpoint answered with HTTP 410 and a JSON error. As of 2026-09-29 it answers HTTP 200 with a plain-text OK. Code that checks only the status code, or that catches exceptions and falls back to an empty result, can look healthy while returning no model output.
Final Thoughts
GitHub Models was the easiest free AI API to start with, precisely because it needed nothing — no signup, no card, and a token you already had. That combination is not available anywhere now. The nearest thing in 2026 is Groq's free plan: no card, an OpenAI-compatible endpoint, and open-weight models fast enough for real use — provided you size your usage against a 200,000-token daily budget rather than a request count.
Related Reading
- Groq free API: current models and limits — the closest no-card replacement
- OpenRouter free models — widest free selection behind one endpoint