GitHub Models is an underrated platform: a playground and an API with flagship and open models (GPT-5.x, the o-series, DeepSeek-R1/V3, Llama 4, Phi-4, Codestral) under a single GitHub token. The trap is the limits: they are tied to the Copilot tier and tightly capped by tokens. We cover access, limits and sensible use.
Access in Three Steps
github.com → sign in → github.com/marketplace/models → choose a model → Use this model → Create personal access token (a PAT with the models permission) → Generate. The token is an ordinary GitHub PAT, no cards and no phone numbers. Verification:
curl https://models.github.ai/inference/chat/completions \
-H "Authorization: Bearer ghp_ВАШ_PAT" \
-H "Content-Type: application/json" \
-d '{"model": "openai/gpt-4.1-mini",
"messages": [{"role": "user", "content": "Ответь одним словом: работает?"}]}'The web playground lets you run models without code — handy for comparisons and prototypes before connecting the API.
Limits: The Main Constraint
The free limits depend on the Copilot tier (Free/Pro/Business/Enterprise) and are tightly capped by tokens per day and requests per minute. Practical figures: a few requests per minute and modest daily ceilings on Free — enough for personal experimentation, not for a pipeline. This is a “model showcase,” not free inference hosting: full-scale volume is not on offer here.
The right application: comparing models (one interface — fifty models), one-off tasks with flagships, prototypes before choosing a paid provider. For constant work — the OpenRouter free pool or the specialized platforms from the directory.
Models: a Showcase of the Whole World
| Group | Models | Comment |
|---|---|---|
| OpenAI | GPT-5.x, mini/nano, the o-series | Flagships in the playground |
| DeepSeek | R1, V3 | Reasoning and general purpose |
| Meta/Microsoft | Llama 4, Phi-4 | Open and compact |
| Mistral | Codestral 25.01 | The code specialist |
| Embeddings | Vector models | For search |
The value of the showcase: compare models before buying keys — the playground is the same for everyone, and a test of ten tasks (the methodology from the piece on leaderboards) runs at no cost.
Frequently Asked Questions
Can the limits be raised? With the Copilot tier — moderately; pipeline-scale volumes GitHub Models cannot cover in principle.
Is the data private? GitHub infrastructure, Microsoft’s standard policy — but it is still a cloud; be careful with secrets.
How does it differ from OpenRouter? A showcase against a marketplace: GitHub — models with a single PAT for experiments; OpenRouter — working quotas and rotation of the free pool.
Is Codestral free here? Within the showcase limits — yes; for a real code pipeline — a direct Mistral key with its billion tokens.
Is a separate SDK needed? No: the endpoint is OpenAI-compatible — the same client with base_url swapped to models.github.ai/inference and the PAT instead of a third-party provider’s key. Code written for other platforms moves over by changing two lines of configuration.
Is GitHub Actions suitable for automation? Yes: the same PAT works in workflows, and for low-volume nightly tasks it is a workable scenario. The daily ceilings remain the same, though — a regular pipeline still runs into the Copilot-tier limits.
Where to start: the playground or the API? With the web: run the models in the playground and refine the wording first, and connect the code once a candidate is chosen. The quota is spent identically in both modes, so it is reasonable to go through the experimental stage with a minimal number of calls.
How many models can you realistically test in a day? A few, if you keep the prompts short: with a few requests per minute and modest daily ceilings, long runs do not fit. Ten tasks per model with a fixed template give more understanding than a hundred random questions.
A Practical Case: the Showcase as a Test Bench
The platform’s main scenario — choosing a model for a task before buying keys from any provider. Assemble ten typical prompts: a couple of reasoning tasks, a couple of code tasks, classification, translation, summarization. The request template stays one and the same, only the model name changes — only with this approach will the comparison be fair. The skeleton of a Python script:
from openai import OpenAI
client = OpenAI(
base_url="https://models.github.ai/inference",
api_key="ghp_ВАШ_PAT",
)
CANDIDATES = [
"openai/gpt-4.1-mini",
"deepseek/DeepSeek-R1",
"microsoft/Phi-4",
]
def ask(model, task):
resp = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": task}],
)
return resp.choices[0].message.content.strip()
for task in TASKS: # десять типовых промптов
for model in CANDIDATES:
print(model, "->", ask(model, task)[:120])Three rules for the bench. First: short prompts — the daily token ceiling on Free is modest, and long inputs will eat it before the run ends. Second: pauses between calls — with a few requests per minute, a fast batch ends in a 429 error, and the rest of the day will have to be waited out. Third: save the answers to a file — comparing recorded texts is more objective than comparing from memory, and a repeat run shows how consistent the answers are from one launch to another.
Interpreting the results is also a methodology, not a matter of will: compare not “liked it or not” but pre-named criteria — accuracy on the ten tasks, answer length, generation speed, behavior in Russian. The model table above helps group the candidates: test the open lines for robustness to format, the flagships for reasoning quality, Codestral for typical code edits. Two or three iterations with prompt adjustments — and you hold a justified choice, not an impression from the first answer.
Token hygiene deserves special attention: a PAT with the models permission is a full-fledged access key, so store it in environment variables rather than repository code, and set a lifetime at creation. If the token ends up in logs or correspondence — revoke it in the developer settings and issue a new one: the procedure takes a minute, while the consequences of a leak add up to an unpleasant evening. For personal scripts an environment variable is enough; for team projects — secrets in the repository settings.
After the run you will have a shortlist of two or three candidates. From there the path leads away from the showcase: constant work requires quotas that do not exist here, so the candidates move to platforms with working limits — via the provider directory or into the scheme of the limit pie. That is how the showcase does its job: cheap selection instead of expensive trial and error on paid keys.
GitHub Models is a “testing ground”: compare models for free, try out the flagships, shortlist candidates. For constant work — other platforms from the directory. Limits are as of autumn 2026.
