gpt-4.1-mini — Free API
Created by OpenAI ⭐ Score: 56github-models/gpt-4-1-mini What is gpt-4.1-mini?
GPT-4.1 Mini is OpenAI's cost-optimized small model, available free through GitHub Models. With a 1M-token context window — matching the full GPT-4.1 — and 32K max output, it punches above its weight class for long-context tasks like document Q&A, full-codebase analysis, and multi-turn conversations. The trade-off versus full GPT-4.1 is lower reasoning depth on complex tasks. Rate-limited to 15 RPM and 150 requests per day with per-request caps (8K input / 4K output), it is generous enough for prototyping and personal projects. Fully OpenAI SDK-compatible; requires only a GitHub account.
gpt-4.1-mini API Code Example
Paste your API key and run. See the config generator for Claude Code, Cursor, and more tools.
Other Free Models from GitHub Models
More About GitHub Models
How to get an API key, rate limits, platform limitations, and tool configuration — everything you need to set up GitHub Models as a free LLM API backend.
View GitHub Models full guide →