OpenAI: GPT-4.1

openai/gpt-4.1

openai/gpt-4.1-2025-04-14
Created Apr 14, 20251,047,576 context
Starting at $2/M input tokensStarting at $8/M output tokens

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 GPT-4.5 across coding (54.6% SWE-bench Verified), instruction compliance (87.4% IFEval), and multimodal understanding benchmarks. It is tuned for precise code diffs, agent reliability, and high recall in large document contexts, making it ideal for agents, IDE tooling, and enterprise knowledge retrieval.

Providers for GPT-4.1

OpenRouter routes requests to the best providers that are able to handle your prompt size and parameters, with fallbacks to maximize uptime.

Apps using GPT-4.1

Top public apps this week using this model

Recent activity on GPT-4.1

Tokens processed per day

Uptime stats for GPT-4.1

Uptime stats for GPT-4.1 across all providers

Sample code and API for GPT-4.1

OpenRouter normalizes requests and responses across providers for you.

OpenRouter provides an OpenAI-compatible completion API to 400+ models & providers that you can call directly, or using the OpenAI SDK. Additionally, some third-party SDKs are available.

In the examples below, the OpenRouter-specific headers are optional. Setting them allows your app to appear on the OpenRouter leaderboards.

Using third-party SDKs

For information about using third-party SDKs and frameworks with OpenRouter, please see our frameworks documentation.

See the Request docs for all possible fields, and Parameters for explanations of specific sampling parameters.

    GPT-4.1 - API, Providers, Stats | OpenRouter