OpenAI

GPT-4.1

Chat
openai/gpt-4.1
CompareGet Started

GPT-4.1 is an earlier-generation OpenAI flagship model, released on 2025-04-14 and optimized for advanced instruction following, real-world software engineering, and long-context reasoning. Its 1M-token context window suits complex document analysis and large-scale code generation, and the model supports vision, tool use, prompt caching, and audio input. Context window: 1M tokens, output: 32K. Newer GPT-5-series and Codex models have since taken over frontier coding work, but GPT-4.1 remains a dependable, lower-cost choice for long-document workloads and existing integrations. Accessible via the OpenAI-compatible protocol.

Context Window
1M
Max Output Tokens
33K
Released
2025-04-14
Capabilities
VisionFunction CallingPrompt CachingAudio Input
Available Providers
AzureAzure
Supported Protocols
OpenAIopenai

Providers

AzureAzure
Input Tokens
$2/M
Output Tokens
$8/M
Cache Read
$0.5/M
Web Search
$0.035/R
Protocols
OpenAIopenai/v1/chat/completions/v1/responses

Code Examples

from openai import OpenAI
client = OpenAI(
base_url="https://api.ofox.run/v1",
api_key="YOUR_OFOX_API_KEY",
)
response = client.chat.completions.create(
model="openai/gpt-4.1",
messages=[
{"role": "user", "content": "Hello!"}
],
)
print(response.choices[0].message.content)

Benchmarks

LMArenaEvaluated as gpt-4.1-2025-04-14

GPT-4.1 scores 1414 in the Overall category of the LMArena text leaderboard (style control), ranking #109 of 374 models based on 50,934 human preference votes (updated 2026-07-12).

Benchmark scores for gpt-4.1-2025-04-14 on LMArena
CategoryArena Score95% CIRankVotes
Overall141414101417#109 of 37450,934
Hard Prompts143114261436#111 of 37422,148
Coding145614501463#113 of 3699,308
Math137313631383#157 of 3623,222
Creative Writing140213951410#78 of 3726,702
Instruction Following140313971408#107 of 37413,281
Chinese141614031428#133 of 3442,462

Source: LMArena · CC BY 4.0 · Updated 2026-07-12 · Methodology · Ranks compare models within each category of the LMArena text leaderboard (style control). Scores come from third-party human preference evaluations, not from OFOX.

Frequently Asked Questions

GPT-4.1 on Ofox.ai costs $2/M per million input tokens and $8/M per million output tokens. Pay-as-you-go, no monthly fees.