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?'
})

Playground

Try out GPT-4.1 by OpenAI. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.