gpt-4.1 — Free API
Created by OpenAI ⭐ Score: 57github-models/gpt-4-1 What is gpt-4.1?
GPT-4.1 is OpenAI's mid-tier model available for free through GitHub Models — Microsoft's AI playground for GitHub users. With a 1M-token context window, 32K max output, and OpenAI-native SDK compatibility, it is the most accessible way to use a GPT-4-class model without paying for an OpenAI API key. The free tier is rate-limited to 10 RPM and 50 requests per day, and per-request token caps apply (8K input / 4K output), so it is best suited for prototyping, testing prompts, and lightweight coding tasks rather than production deployment. Requires only a GitHub account — no separate API key signup needed.
gpt-4.1 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 →