---
last_updated: 2026-11-28
source_url: https://opper.ai/openai/gpt-4-1
title: "GPT-4.1 by OpenAI"
description: "GPT-4.1 by OpenAI is a flagship model with a 1M token context window and major gains in coding and instruction following, plus vision, structured output, and tools."
---

# GPT-4.1

By [OpenAI](https://opper.ai/openai).

Released 14 Apr 2025 · [Announcement](https://developers.openai.com/api/docs/changelog) · [All OpenAI releases](https://opper.ai/model-releases/openai)

GPT-4.1 is OpenAI's general purpose model built around a 1 million token context window, letting it reason over very large documents, full codebases, and long conversation histories in a single call. OpenAI reports it was trained to keep reliable attention across the full context length, with notable improvements in coding and instruction following over GPT-4o.

It is multimodal, supporting text and image inputs, and produces structured output that conforms to a supplied JSON schema. Function calling lets it compose external tools into agentic workflows.

The model suits applications that need deep document analysis, code generation with broad context, complex reasoning over large corpora, and tool-using agents.

## Available routes

GPT-4.1 runs on 1 route through the Opper gateway. Prices are per 1M tokens. Its route also sells priority processing: the same model at another price, picked per request with service_tier. [How service tiers work](https://docs.opper.ai/build/gateway/service-tiers). Its routes and prices, live from the catalogue, are public JSON with no API key needed at https://api.opper.ai/v3/models?q=openai%2Fgpt-4.1.

| Provider | Model id | Region | Zero data retention | Training | Input | Output | Cache read |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [OpenAI](https://opper.ai/provider/openai) | `openai/gpt-4.1` | US (United States) | Abuse monitoring | No | $2.00 | $8.00 | $0.50 |
| [OpenAI](https://opper.ai/provider/openai), Priority | `openai:priority/gpt-4.1` | US (United States) | Abuse monitoring | No | $3.50 | $14.00 | $0.88 |

## Key info

- Model id: `openai/gpt-4.1`
- Input: Text, Image, Files
- Output: Text
- Features: Tools, Structured output, PDF input
- Context window: 1M
- Max output: 33K
- Input price: $2.00 per 1M tokens ($0.50 cache read)
- Output price: $8.00 per 1M tokens
- Released: 14 Apr 2025
- US residency available
- Zero data retention with abuse monitoring
- No training by default

## Data handling per route

Each route hosting GPT-4.1 has its own privacy posture, residency, and GDPR terms. Postures are maintained by Opper with a last-verification timestamp.

### OpenAI — United States

Zero data retention with abuse monitoring: prompts and outputs are kept for up to 30 days for abuse monitoring only, and are not used for training. No training on customer data. US; SCCs.

- Zero data retention: With abuse monitoring, 30-day window.
- Training: No training on customer data.
- Logging: Abuse monitoring (30-day retention)
- Abuse monitoring: On by default, holds flagged content, 30 days, a person can view samples
- Caching: Prompt cache
- Transfer mechanism: SCCs

Verified by Opper on 2026-09-16.

## Benchmarks

Independent benchmark scores via [Artificial Analysis](https://artificialanalysis.ai) ([view on AA](https://artificialanalysis.ai/models/gpt-4-1)). Indices and domain scores are out of 100, Omniscience runs from −100 to 100, Briefcase is an Elo rating, and the other evaluation scores are the share of tasks solved.

- Global rank: #236 of 523 LLMs on the [LLM leaderboard](https://opper.ai/llm-leaderboard)
- Tier: Efficient
- Output speed: 191 tok/s
- Intelligence Index (previous version): 12.7

### Coding

- LiveCodeBench: 46%

### Agentic & knowledge work

- Terminal-Bench Hard: 14%
- τ²-Bench Telecom: 47%

### Science & reasoning

- Humanity's Last Exam: 4%
- GPQA Diamond: 67%
- Long-context reasoning: 68%

### Knowledge

- MMMU-Pro: 61%
- MMLU-Pro: 81%

### Math & instruction following

- AIME 2025: 35%
- IFBench: 43%

## Get started

Call GPT-4.1 through the Opper gateway with one API key. Opper is drop-in compatible with the OpenAI, Anthropic and Google AI SDKs.

GPT-4.1 is a premium model on Opper. Sign up needs no credit card: you get an API key straight away and the free models work in the playground and the API. Add a card to use premium models, pay-as-you-go with no minimum.

### Set it up with your agent

Paste this into a coding agent like Claude Code, Cursor or Codex and it will wire up Opper for you:

```text
Use curl to download, read and follow: https://skills.opper.ai Call GPT-4.1
```

### Or call it directly

OpenAI:

```javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPPER_API_KEY,
  baseURL: "https://api.opper.ai/v3/compat",
});

const completion = await client.chat.completions.create({
  model: "openai/gpt-4.1",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);
```

Anthropic:

```javascript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.OPPER_API_KEY,
  baseURL: "https://api.opper.ai/v3/compat",
});

const message = await client.messages.create({
  model: "openai/gpt-4.1",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello" }],
});
console.log(message.content);
```

Gemini:

```javascript
import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({
  apiKey: process.env.OPPER_API_KEY,
  httpOptions: { baseUrl: "https://api.opper.ai/v3/compat" },
});

const response = await ai.models.generateContent({
  model: "openai/gpt-4.1",
  contents: "Hello",
});
console.log(response.text);
```

cURL:

```bash
curl https://api.opper.ai/v3/compat/chat/completions \
  -H "Authorization: Bearer $OPPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4.1",
    "messages": [{ "role": "user", "content": "Hello" }]
  }'
```

## Use GPT-4.1 in your apps

Pick your tool to see how to run it on GPT-4.1 through Opper.

- [Claude Code](https://opper.ai/apps/claude-code/gpt-4-1)
- [Claude Cowork](https://opper.ai/apps/claude-cowork/gpt-4-1)
- [Codex](https://opper.ai/apps/codex/gpt-4-1)
- [DeepSeek Harness](https://opper.ai/apps/deepseek-harness/gpt-4-1)
- [GitHub Copilot CLI](https://opper.ai/apps/github-copilot-cli/gpt-4-1)
- [Aider](https://opper.ai/apps/aider/gpt-4-1)
- [Goose](https://opper.ai/apps/goose/gpt-4-1)
- [Droid](https://opper.ai/apps/droid/gpt-4-1)
- [OpenCode](https://opper.ai/apps/opencode/gpt-4-1)
- [Pi](https://opper.ai/apps/pi/gpt-4-1)
- [OpenClaw](https://opper.ai/apps/openclaw/gpt-4-1)
- [Hermes](https://opper.ai/apps/hermes/gpt-4-1)
- [Copilot for Obsidian](https://opper.ai/apps/obsidian-copilot/gpt-4-1)
- [OmniRoute](https://opper.ai/apps/omniroute/gpt-4-1)
- [Cursor](https://opper.ai/apps/cursor/gpt-4-1)
- [Cline](https://opper.ai/apps/cline/gpt-4-1)
- [Continue](https://opper.ai/apps/continue/gpt-4-1)
- [Kilo Code](https://opper.ai/apps/kilo-code/gpt-4-1)
- [GitHub Copilot](https://opper.ai/apps/github-copilot/gpt-4-1)
- [Zed](https://opper.ai/apps/zed/gpt-4-1)
- [JetBrains AI Assistant](https://opper.ai/apps/jetbrains-ai-assistant/gpt-4-1)
- [Voidleap Code](https://opper.ai/apps/voidleap-code/gpt-4-1)
- [n8n](https://opper.ai/apps/n8n/gpt-4-1)
- [LibreChat](https://opper.ai/apps/librechat/gpt-4-1)
- [Open WebUI](https://opper.ai/apps/open-webui/gpt-4-1)
- [See all apps](https://opper.ai/apps)

## Other models from OpenAI

- [GPT-6.2 Astra](https://opper.ai/openai/gpt-6-2-astra)
- [GPT-6 Astra](https://opper.ai/openai/gpt-6-astra)
- [GPT-6.2 Sol](https://opper.ai/openai/gpt-6-2-sol)
- [GPT-6.1 Sol](https://opper.ai/openai/gpt-6-1-sol)
- [GPT-6.1 Terra](https://opper.ai/openai/gpt-6-1-terra)
- [GPT-6 Luna](https://opper.ai/openai/gpt-6-luna)
