Models / GPT-4.1 Mini

GPT-4.1 Mini

proprietary

Cost-efficient variant of GPT-4.1. Good for high-volume tasks where full GPT-4.1 quality isn't needed.

openai/gpt-4.1-mini
Context Window
1M
Max Output
33K
Providers
1
Released
2025-04

Capabilities

chatcodevisiontoolsfunction_callingstreamingjson_mode

Pricing by Provider

ProviderInput $/1MOutput $/1MLatency p50Latency p95Status
openai$0.40$1.60250ms700ms

Quick Start

Python
import magicrouter

mr = magicrouter.Client(
    provider_keys={"openai": "your-api-key"}
)

response = mr.chat(
    "openai/gpt-4.1-mini",
    "Your prompt here"
)
print(response.choices[0].message.content)
TypeScript
import { MagicRouter } from "magicrouter";

const mr = new MagicRouter({
  providerKeys: { openai: "your-api-key" }
});

const response = await mr.chat({
  model: "openai/gpt-4.1-mini",
  messages: [{ role: "user", content: "Your prompt here" }]
});
console.log(response.choices[0].message.content);
cURL
curl https://api.openai.com/v1/chat/completions \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4.1-mini",
    "messages": [{"role": "user", "content": "Your prompt here"}]
  }'

Use this model

Sign up for free and test GPT-4.1 Mini in the playground

Get Started
GPT-4.1 Mini — MagicRouter