openaiVision
OpenAI: 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...
Context
1M tokens
Input / 1M tokens
$2
Output / 1M tokens
$8
Benchmark
—
Pricing
Input tokens$2 per 1M tokens
Output tokens$8 per 1M tokens
Cache read$0.50 per 1M tokens
Technical details
Model IDopenai/gpt-4.1
Context window1M tokens
Input modalitiesimage, text, file, pdf
Output modalitiestext
TokenizerGPT
Use with MegaBrain
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://getmegabrain.com/api/gateway/v1',
apiKey: process.env.MEGABRAIN_API_KEY,
})
const response = await client.chat.completions.create({
model: 'openai/gpt-4.1',
messages: [{ role: 'user', content: 'Hello!' }],
})