GPT-4o mini — GitHub Models

Free, rate-limited GPT-4o mini via GitHub Models — authenticate with a GitHub token, no credit card.

Updated 7/2/2026Provider trust 50/1002 code examples

About the Model

GPT-4o mini is OpenAI's fast, low-cost multimodal model for chat, extraction, classification, and lightweight vision tasks. It is a strong default when you need fast responses and a large 128K context window.

Why choose it?

  • Fast and inexpensive: better for high-volume workloads than heavier reasoning models.
  • Multimodal: supports text and image inputs.
  • OpenAI-compatible paths: both GitHub Models and Vercel AI Gateway can be called with familiar chat completions code.

Free access options

  • GitHub Models: free, rate-limited access with a GitHub token. No credit card required.
  • Vercel AI Gateway: recurring monthly credits through one gateway key. No credit card required to start.

Use GPT-4o mini when you need a dependable free API for prototypes, assistants, summaries, and classification. For deeper reasoning, compare DeepSeek R1 or Claude Sonnet pages in this directory.

How to Access for Free (via GitHub Models)

GitHub Models gives free, rate-limited access to GPT-4o mini through a GitHub token. It is a good first stop if you already have a GitHub account and want a no-credit-card OpenAI-compatible API.

Use this endpoint for fast chat, summarization, extraction, and small vision workflows. Free limits vary by GitHub plan, so treat it as a prototype and learning path rather than a guaranteed production quota.

Try it in your browser

Pick a model, paste your own free key, and run. Your key is sent once to call the provider and never stored on our servers.

Pick a model, paste your own free key, and run. Your key is sent once to call the provider and never stored on our servers.

Code Examples

curl
curl https://models.github.ai/inference/chat/completions \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-4o-mini","messages":[{"role":"user","content":"Summarize this free API directory in one sentence."}]}'
python
from openai import OpenAI

client = OpenAI(base_url="https://models.github.ai/inference", api_key="GITHUB_TOKEN")
response = client.chat.completions.create(
    model="openai/gpt-4o-mini",
    messages=[{"role": "user", "content": "Summarize this free API directory in one sentence."}],
)
print(response.choices[0].message.content)