Skip to content

GPT-4.1

GPT-4.1 is OpenAI's April 2025 general-purpose API model, purpose-built for coding and instruction following with a context window of 1.0M tokens, a 21-point SWE-bench gain over GPT-4o, and a 75% prompt caching discount, at a lower cost than its predecessor.

File InputTool UseVision (Image)
index.ts
import { streamText } from 'ai'
const result = streamText({
model: 'openai/gpt-4.1',
prompt: 'Why is the sky blue?'
})

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
ZDR
No Training
Release Date
Azure
Legal:Terms
Privacy
1M
1.0s
79tps
$2.00/M$8.00/M
Read:$0.5/M
Write:
$14/K
+ input costs
04/14/2025
OpenAI
Legal:Terms
Privacy
1M
0.8s
76tps
$2.00/M$8.00/M
Read:$0.5/M
Write:
$10.00/K
+ input costs
04/14/2025