# GPT 4.1 Mini (free) Model id on AIHubMix: `gpt-4.1-mini-free` Create an API key: https://console.aihubmix.com/?utm_source=llms-agent&utm_medium=model-llms > **This model has been retired.** Requests return 404 model_retired. > > The specs and pricing below stay readable for migration and cost comparison — this id is no longer a live integration target. Responses for this id also carry RFC 8594 headers: `Sunset` (the retirement instant), `Deprecation`, and `Link: …; rel="successor-version"` when a successor is published — read those to detect this automatically. All retirements: https://aihubmix.com/models/retirements > This free model API comes from the OpenAI model deployed on Azure. To prevent abuse, the external content filter provided by Azure has been enforced, which will result in additional delays. If you want to experience the full version of the model API without filters, please use the paid version and request the model name ID without "-free". - Developer: OpenAI - Context window: 1,047,576 tokens - Input modalities: text, image, PDF - Capabilities: Streaming, Tool calling, Web search, Code interpreter, File search, Structured outputs - Release date: 2025-04-14 - Pricing: free tier / see model page ## Endpoints (base URL: https://aihubmix.com) - `POST /v1/chat/completions` — OpenAI Chat Completions (`Authorization: Bearer $AIHUBMIX_API_KEY`) ## Example ```bash curl -s https://aihubmix.com/v1/chat/completions \ -H "Authorization: Bearer $AIHUBMIX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4.1-mini-free","messages":[{"role":"user","content":"Hello"}]}' ``` ## Response This id is retired, so the call above no longer succeeds. It returns HTTP 404: ```json {"error":{"code":"model_retired","message":"The model gpt-4.1-mini-free has been retired and is no longer available. (tid: …)","type":"Aihubmix_api_error"}} ``` The request shape is kept above so it can be diffed against a successor's — point `"model"` at a live id to get a real completion. Discover live ids in the catalog (no auth): https://aihubmix.com/api/v1/models?type=llm&sort_by=order ## Errors Error responses carry a `tid` (trace id) — include it when contacting support. Reference: https://docs.aihubmix.com/en/FAQs/HTTP-Codes.md - 400 — parameter error; most are passed through from the upstream provider (media: `prompt_missing`, `size_not_supported`, `n_not_within_range`, …) - 401 — missing `Authorization` header, or the key is invalid/expired - 403 — `insufficient_user_quota` (top up at https://console.aihubmix.com/?utm_source=llms-agent&utm_medium=model-llms), account suspended, or this key is not allowed to use this model - 429 — rate limited; back off and retry - 503 — no channel can serve the request (check the model id and your access), or the upstream provider is throttling; retry later ## More - Model page: https://aihubmix.com/model/gpt-4.1-mini-free - Try in browser: https://playground.aihubmix.com/?model=gpt-4.1-mini-free - Compare with another model (human-facing, side-by-side specs and pricing): https://aihubmix.com/compare — pick this model and a peer there; published pairs are listed in https://aihubmix.com/sitemap-compare.xml, unpublished pairs 404 so do not compose the path by hand - Full parameter schema (machine-readable, authoritative): https://aihubmix.com/model-data/models/gpt-4.1-mini-free.8d38283d.json — per-protocol parameters with types, ranges, enums and defaults. Refreshed together with this page; if it ever 404s, re-resolve via `https://aihubmix.com/model-data/index.json` (find this id, fetch its `path`) - Generate runnable code programmatically: npm `@aihubmix/codegen` — the generator behind the Playground's "Get Code" (4 protocols × 7 languages, media endpoints included); the body it builds is the exact wire body the Playground sends, so generated snippets and real requests cannot diverge. `@aihubmix/model-schema` (npm) translates the parameter schema above into codegen input - Site index for agents: https://aihubmix.com/llms.txt · Onboarding: https://aihubmix.com/agents.md --- Canonical version of this document: https://aihubmix.com/model/gpt-4.1-mini-free/llms.txt