Model detail
GPT-4.1
GPT-4.1 is a flagship large language model optimized for advanced instruction following, real-world software engineering, and long-context reasoning. It supports a 1 million token context window and outperforms GPT-4o and GPT-4.5 across coding (54.6% SWE-bench Verified), instruction compliance (87.4% IFEval), and multimodal understanding benchmarks. It is tuned for precise code diffs, agent reliability, and high recall in large document contexts, making it ideal for agents, IDE tooling, and enterprise knowledge retrieval.
Model specs
- Model ID
-
gpt-4.1
- Context length
- 1.047576M
- Max output
- 32.768K
- I/O modalities
- Released
- 2025-04
02
API endpoints
One MixRoute gateway, OpenAI-compatible
-
OpenAI-compatible
/v1/chat/completionsPOST
03
Pricing
Flat rate, unit: /1M Tokens
Input
$2.0000 /1M Tokens
Completion
$4.0000 /1M Tokens
Cache read
$0.5000 /1M Tokens
05
Selection summary
Quickly judge whether it fits your workload
What is this model good for?
Long-context reasoning and software engineering
Use GPT-4.1 for tasks requiring a 1M token context window, including long-document analysis, complex codebases, and enterprise knowledge retrieval. It excels at instruction following and agent reliability.
What should you check before using it?
Plan for the 1M context window and instruction-following needs
Confirm your workload benefits from the 1M token context window. Test instruction-following accuracy on your specific prompts and verify agent reliability for your most demanding workflows. Knowledge cutoff: 2024-06-01.
Why use it through MixRoute?
GPT-4.1 takes text and images on one route
Text and image inputs share the same route and the same key. MixRoute serves GPT-4.1 on the OpenAI-compatible endpoint /v1/chat/completions; point your existing client at https://api.mixroute.ai/v1 with the model ID gpt-4.1 and re-run your integration tests.
07
Capabilities & compatibility
Unconfirmed capabilities stay "Unknown," no guesses
Tool calling
GPT-4.1 supports function and tool calls.
tools definition; the response returns tool_calls to execute and feed results back.
Structured output
GPT-4.1 can produce JSON-formatted output on demand.
response_format: { type: "json_schema" } forces valid JSON output.
Streaming
GPT-4.1 supports streamed responses.
stream: true streams tokens incrementally, so chat UIs render as they arrive.
Prompt caching
GPT-4.1 supports prompt caching under supported routing conditions.
Vision input
GPT-4.1 can process image inputs alongside text.
image_url content part alongside text messages.
OpenAI SDK
Call GPT-4.1 through MixRoute's OpenAI-compatible endpoint.
base_url to https://api.mixroute.ai/v1; everything else follows the OpenAI style.
08
Token cost estimator
Live estimate from this page's pricing, not an actual bill
Share of the same prefix read repeatedly, up to 100%
09
FAQ
Use the model ID gpt-4.1 through the OpenAI-compatible chat completions endpoint. Check the current API documentation for the exact endpoint path and any required headers.
One endpoint, a testable decision
Test this model and alternate routes with the same request format
Start from a real workload, then let quality, total cost, and failure conditions decide whether to send production traffic.