OpenAI: GPT-4.1

GPT-4.1 is OpenAI's flagship large language model, released 2025-04, tuned for software engineering, agentic workflows, and long-context reasoning. It outperforms GPT-4o and GPT-4.5 on SWE-bench Verified (54.6%) and IFEval (87.4%), with particular strength in precise code diffs, agent reliability, and high recall across large document sets.

Modalities
inImageinTextinFileoutText
Price / 1M−70%
$0.60 / $2.40$2.00 / $8.00
Context
1.048M
Knowledge cutoff
2024-06-30

Capabilities

VisionTool useLong contextPrompt cachingStructured output

Channels

Same weights on every channel. Requests route to the cheapest healthy one; the channel used is printed on each billing line.

Provider
Discount
Input /M
Output /M
Cache Read /M
Cache Create 5m /M
Cache Create 1h /M
Codexcheap
−70%
$0.60
$2.40
$0.15
Defaultstable
−30%
$1.40
$5.60
$0.35

Cost Calculator

Pick a channel and a usage scenario, then drag to your workload — each scenario assumes a different prompt-cache hit rate.

Channel
Scenario
Unit $0.60 / $2.40 /1MDaily chat: 40% cache hit assumed · cache read $0.15 /1M
List price $518.40On MirAPI$155.52/ moYou save $362.88Create an API key

Benchmarks

bar = score (0–100) · ▏ median

Scores from vendor reports and public leaderboards. No private evals.

GPQA Diamond
Science QA
66.5
#74
τ-bench (airline)
Agentic tool use
48.0
#74

Showcase

Three fixed prompts, identical for every chat model. Outputs are archived verbatim — copy the prompt to reproduce.

Task prompt · identical for all models
Build a single-file HTML page using three.js from a CDN: a low-poly planet with a tilted ring of ~200 orbiting particles, a soft key light plus rim light, slow auto-rotation, and drag-to-orbit controls. No build tools — one file only.
Archived output
Archive not published yet

Every model will run this exact prompt; the output lands here verbatim, with tokens and per-run cost.

Quick Start

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.mirapi.ai/v1",   # changed
    api_key=os.environ["MIRAPI_API_KEY"],   # changed
)

resp = client.chat.completions.create(
    model="openai/gpt-4.1",
    messages=[{"role": "user", "content": "Hello"}],
)
Wire GPT-4.1 into your product

1M free tokens to start · no card · OpenAI-compatible, one base_url change

Start free