GPT-4o mini — GitHub Models

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

About the Model

GPT-4o mini is OpenAI's fast, low-cost model — a solid pick for high-volume, latency-sensitive tasks. The providers below show where you can still use it for free.

A note on "reasoning models": when GPT-4o and o1 launched, you had to pick a separate "thinking" model for hard reasoning. That's no longer the case — today's models have reasoning built in. For a free, modern upgrade we recommend GPT-5.4 or MiMo V2.5 Pro.

How to Access for Free (via GitHub Models)

GitHub Models gives free, rate-limited access to OpenAI's GPT-4o mini — authenticate with a GitHub personal access token, no credit card. Free limits vary by your GitHub plan; it's perfect for prototyping high-volume, latency-sensitive tasks.

cURL:

```bash 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":"Write a haiku about free APIs."}]}' ```

Python (OpenAI SDK):

```python from openai import OpenAI

client = OpenAI(base_url="https://models.github.ai/inference", api_key="GITHUB_TOKEN") resp = client.chat.completions.create( model="openai/gpt-4o-mini", messages=[{"role": "user", "content": "Write a haiku about free APIs."}], ) print(resp.choices[0].message.content) ```

Code Examples

No examples provided yet.

GitHub Models GPT-4o mini — GitHub Models - Free AI API | Free AI API