Models / GPT-4.1 Mini
GPT-4.1 Mini
proprietaryCost-efficient variant of GPT-4.1. Good for high-volume tasks where full GPT-4.1 quality isn't needed.
openai/gpt-4.1-miniContext Window
1M
Max Output
33K
Providers
1
Released
2025-04
Capabilities
chatcodevisiontoolsfunction_callingstreamingjson_mode
Pricing by Provider
| Provider | Input $/1M | Output $/1M | Latency p50 | Latency p95 | Status |
|---|---|---|---|---|---|
| openai | $0.40 | $1.60 | 250ms | 700ms |
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"}]
}'