# GPT-4.1

GPT-4.1 es un modelo de OpenAI, lanzado el 2025-04-14. La ventana de contexto es de 1.047.576 tokens. El máximo de salida es de 32.768 tokens. El precio por millón de tokens es de $2,00 para la entrada y $8,00 para la salida.

- Desarrollador: OpenAI
- Id: gpt-4.1
- Según informes: 2025-04-14T10:00:00.000Z
- Lanzado: 2025-04-14T00:00:00.000Z
- Detección: 2026-09-27T20:12:36.085Z
  - [enlace de referencia](https://opencode.ai/data/openai/gpt-4-1)
- Estado: Lanzado
- Disponibilidad en API: 2025-04-14
  - [enlace de referencia](https://openai.com/index/gpt-4-1/)
  - [enlace de referencia](https://openai.com/index/gpt-4-1)
  - [enlace de referencia](https://openai.com/index/gpt-4-1)
- Actualización de producto: 2025-05-14
  - [enlace de referencia](https://help.openai.com/en/articles/6825453-chatgpt-release-notes)
  - [enlace de referencia](https://help.openai.com/en/articles/9624314-model-release-notes)
- Canónica: https://alexgetman.com/es/models/openai/gpt-4-1/

## Preguntas

### ¿Cuál es la ventana de contexto de GPT-4.1?

La ventana de contexto es de 1.047.576 tokens. El máximo de salida es de 32.768 tokens.

### ¿Cuánto cuesta GPT-4.1?

El precio por millón de tokens es de $2,00 para la entrada y $8,00 para la salida. La entrada en caché cuesta $0,50 por millón.

### ¿Cuándo se lanzó GPT-4.1?

El 2025-04-14.

## Cronología

- 2026-10-07T18:13:28.058Z · [OpenAI · ChatGPT release notes](https://help.openai.com/en/articles/6825453-chatgpt-release-notes)
> Starting today, Plus, Pro, and Team users can access GPT-4.1 via the "more models" dropdown in the model picker
- 2026-10-07T19:40:56.675Z · [OpenAI · news](https://openai.com/index/gpt-4-1)
> Introducing GPT-4.1 in the API—a new family of models with across-the-board improvements, including major gains in coding, instruction following, and long-context understanding
- 2026-11-05T14:39:16.565Z · [OpenAI · Model release notes](https://help.openai.com/en/articles/9624314-model-release-notes)
> Starting today, Plus, Pro, and Team users can access GPT-4.1 via the "more models" dropdown in the model picker
- 2026-11-10T17:58:10.980Z · [GitHub · openai/openai-agents-js · code](https://github.com/openai/openai-agents-js/blob/7589b9c40120b89a7d2d28a5a60b4defe1ed7bf5/packages/agents-core/src/sandbox/capabilities/compaction.ts)
> _WINDOWS_1M = new Set([
>   'gpt-6-astra',
>   'gpt-6-sol',
>   'gpt-6-luna',
>   'gpt-6.1-sol',
>   'gpt-5.6',
>   'gpt-5.6-sol',
>   'gpt-5.6-terra',
>   'gpt-5.6-luna',
>   'gpt-5.4',
>   'gpt-5.4-2026-03-05',
>   'gpt-5.4-pro',
>   'gpt-5.4-pro-2026-03-05',
>   'gpt-4.1',
>   'gpt-4.1-2025-04-14',
>   'gpt-4.1-mini',
>   'gpt-4.1-mini-2025-04-14',
>   'gpt-4.1-nano',
>   'gpt-4.1-nano-2025-04-14',
> ]);
> 
> const SANDBOX_CONTEXT_WINDOWS_400K = new Set([
>   'gpt-5',
>   'gpt-5-codex',
>   'gpt-5-mini',
>   'gpt-5-nano',
>   'gpt-5-pro',
>   'gpt-5.1',
>   'gpt-5.1-codex',
>   'gpt-5.1-codex-max',
>   'gpt-5.1-codex-mini',
>   'gpt-5.2',
>   'gpt-5.2-codex',
>   'gpt-5.2-codex-cyber',
>   'gpt-5.2-pro',
>   'gpt-5.3-codex',
>   'gpt-5.3-codex-spark',
>   'gpt-5.4-mini',
>   'gpt-5.4-nano',
> ]);
> 
> const SANDBOX_CONTEXT_WINDOWS_200K = new Set([
>   'codex-mini-latest',
>   'o1',
>   'o1-2024-12-17',
>   'o1-pro',
>   'o3',
>   'o3-2025-04-16',
>   'o3-mini',
>   'o3
- 2026-11-10T17:58:16.002Z · [GitHub · openai/openai-python · code](https://github.com/openai/openai-python/blob/0ebd00647f6088fb100b03440c6c4554bbab549d/src/openai/types/beta/beta_responses_client_event.py)
> 1-chat-latest",
>             "gpt-5",
>             "gpt-5-mini",
>             "gpt-5-nano",
>             "gpt-5-2025-08-07",
>             "gpt-5-mini-2025-08-07",
>             "gpt-5-nano-2025-08-07",
>             "gpt-5-chat-latest",
>             "gpt-4.1",
>             "gpt-4.1-mini",
>             "gpt-4.1-nano",
>             "gpt-4.1-2025-04-14",
>             "gpt-4.1-mini-2025-04-14",
>             "gpt-4.1-nano-2025-04-14",
>             "o4-mini",
>             "o4-mini-2025-04-16",
>             "o3",
>             "o3-2025-04-16",
>             "o3-mini",
>             "o3-mini-2025-01-31",
>             "o1",
>             "o1-2024-12-17",
>             "o1-preview",
>             "o1-preview-2024-09-12",
>             "o1-mini",
>             "o1-mini-2024-09-12",
>             "gpt-4o",
>             "gpt-4o-2024-11-20",
>             "gpt-4o-2024-08-06",
>             "gpt-4o-2024-05-13",
>             "gpt-aud
- 2026-11-10T17:59:50.472Z · [GitHub · openai/openai-agents-python · code](https://github.com/openai/openai-agents-python/blob/d68961657843c7d81dfc25834484f8aac2957eb3/docs/ja/models/index.md)
>  `openai/...` と `any-llm/...` のモデル名を混在させる場合は、[`MultiProvider`][agents.MultiProvider] を使用し、そこで `openai_use_responses_websocket=True` を設定します。
> 
> `MultiProvider` には、従来からの次の 2 つのデフォルト動作があります。
> 
> - `openai/...` は OpenAI プロバイダーのエイリアスとして扱われるため、`openai/gpt-4.1` はモデル `gpt-4.1` としてルーティングされます。
> - 不明なプレフィックスはそのまま渡されず、`UserError` が発生します。
> 
> リテラルの名前空間付きモデル ID を要求する OpenAI 互換エンドポイントを OpenAI プロバイダーで使用する場合は、パススルー動作を明示的に有効にしてください。WebSocket が有効な設定では、`MultiProvider` にも `openai_use_responses_websocket=True` を維持してください。
> 
> ```python
> from agents import Agent, MultiProvider, RunConfig, Runner
> 
> provider = MultiProvider(
>     openai_base_url="https://openrouter.ai/api/v1",
>     openai_api_key="...",
>     openai_use_responses_websocket=True,
>     openai_prefix_mode="model_id",
>     unknown_prefix_mode="model_id",
> )
> 
> agent = Agent(
>     name="Assistant",
>     instructions="Be concise.",
>     model="openai/gpt-4.1",
> )
> 
> re
Esta referencia en el código no confirma un identificador de modelo en uso.
- 2026-11-10T18:00:44.369Z · [GitHub · openai/codex · code](https://github.com/openai/codex/blob/627b579219d492b5445d6d433d3110eb53e507dc/codex-rs/apply-patch/src/parser.rs)
> ror> {
>     let mode = if PARSE_IN_STRICT_MODE {
>         ParseMode::Strict
>     } else {
>         ParseMode::Lenient
>     };
>     parse_patch_text(patch, mode)
> }
> 
> enum ParseMode {
>     /// Parse the patch text argument as is.
>     Strict,
> 
>     /// GPT-4.1 is known to formulate the `command` array for the `local_shell`
>     /// tool call for `apply_patch` call using something like the following:
>     ///
>     /// ```json
>     /// [
>     ///   "apply_patch",
>     ///   "<<'EOF'\n*** Begin Patch\n*** Update File: README.md\n@@...\n*** End Patch\nEOF\n",
>     /// ]
>     /// ```
>     ///
>     /// This is a problem because `local_shell` is a bit of a misnomer: the
>     /// `command` is not invoked by passing the arguments to a shell like Bash,
>     /// but are invoked using something akin to `execvpe(3)`.
>     ///
>     /// This is significant in this case because where a shell would interpret
>     /// `
Esta referencia en el código no confirma un identificador de modelo en uso.
- 2026-11-10T18:00:44.369Z · [GitHub · openai/codex · code](https://github.com/openai/codex/blob/82e6bacb9c6950d3b56cb153847fa80bdd698053/codex-rs/apply-patch/src/parser.rs)
> ror> {
>     let mode = if PARSE_IN_STRICT_MODE {
>         ParseMode::Strict
>     } else {
>         ParseMode::Lenient
>     };
>     parse_patch_text(patch, mode)
> }
> 
> enum ParseMode {
>     /// Parse the patch text argument as is.
>     Strict,
> 
>     /// GPT-4.1 is known to formulate the `command` array for the `local_shell`
>     /// tool call for `apply_patch` call using something like the following:
>     ///
>     /// ```json
>     /// [
>     ///   "apply_patch",
>     ///   "<<'EOF'\n*** Begin Patch\n*** Update File: README.md\n@@...\n*** End Patch\nEOF\n",
>     /// ]
>     /// ```
>     ///
>     /// This is a problem because `local_shell` is a bit of a misnomer: the
>     /// `command` is not invoked by passing the arguments to a shell like Bash,
>     /// but are invoked using something akin to `execvpe(3)`.
>     ///
>     /// This is significant in this case because where a shell would interpret
>     /// `
Esta referencia en el código no confirma un identificador de modelo en uso.
- 2026-11-10T20:40:17.231Z · [GitHub · openai/openai-agents-python · code](https://github.com/openai/openai-agents-python/blob/d68961657843c7d81dfc25834484f8aac2957eb3/src/agents/extensions/models/litellm_provider.py)
> dels import get_default_model
> from ...models.interface import Model, ModelProvider
> from .litellm_model import LitellmModel
> 
> # This is kept for backward compatibility but using get_default_model() method is recommended.
> DEFAULT_MODEL: str = "gpt-4.1"
> 
> 
> class LitellmProvider(ModelProvider):
>     """A ModelProvider that uses LiteLLM to route to any model provider. You can use it via:
>     ```python
>     Runner.run(agent, input, run_config=RunConfig(model_provider=LitellmProvider()))
>     ```
>     See supported models here: [litellm models](https://docs.litellm.ai/docs/providers).
> 
>     NOTE: API keys must be set via environment variables. If you're using models that require
>     additional configuration (e.g. Azure API base or version), those must also be set via the
>     environment variables that LiteLLM expects. If you have more advanced needs, we recommend
>     copy-pasting this clas
- 2026-11-12T18:45:20.401Z · [GitHub · openai/openai-node · code](https://github.com/openai/openai-node/blob/b579bcb3e586d22269ffe6fe504653a0e05acbe8/src/resources/beta/assistants.ts)
> s.openai.com/api/docs/models) for descriptions
>    * of them.
>    */
>   model?:
>     | (string & {})
>     | 'gpt-5'
>     | 'gpt-5-mini'
>     | 'gpt-5-nano'
>     | 'gpt-5-2025-08-07'
>     | 'gpt-5-mini-2025-08-07'
>     | 'gpt-5-nano-2025-08-07'
>     | 'gpt-4.1'
>     | 'gpt-4.1-mini'
>     | 'gpt-4.1-nano'
>     | 'gpt-4.1-2025-04-14'
>     | 'gpt-4.1-mini-2025-04-14'
>     | 'gpt-4.1-nano-2025-04-14'
>     | 'o3-mini'
>     | 'o3-mini-2025-01-31'
>     | 'o1'
>     | 'o1-2024-12-17'
>     | 'gpt-4o'
>     | 'gpt-4o-2024-11-20'
>     | 'gpt-4o-2024-08-06'
>     | 'gpt-4o-2024-05-13'
>     | 'gpt-4o-mini'
>     | 'gpt-4o-mini-2024-07-18'
>     | 'gpt-4.5-preview'
>     | 'gpt-4.5-preview-2025-02-27'
>     | 'gpt-4-turbo'
>     | 'gpt-4-turbo-2024-04-09'
>     | 'gpt-4-0125-preview'
>     | 'gpt-4-turbo-preview'
>     | 'gpt-4-1106-preview'
>     | 'gpt-4-vision-preview'
>     | 'gpt-4'
>     | 'gpt-4-0314'
>     | 'gpt-4-0613'
>     | 'gpt-4
- 2026-11-14T00:29:48.887Z · [OpenAI · official articles](https://openai.com/index/introducing-gpt-5-2)
- 2026-11-14T01:20:31.106Z · [OpenAI · official articles](https://openai.com/index/introducing-gpt-5-for-developers)
> On OpenAI-MRCR, a measure of long-context information retrieval, GPT‑5 outperforms o3 and GPT‑4.1, by a margin that grows substantially at longer input lengths
- 2026-11-14T01:41:00.390Z · [OpenAI · official articles](https://openai.com/index/healthbench)
- 2026-11-14T02:01:23.702Z · [OpenAI · official articles](https://openai.com/index/introducing-o3-and-o4-mini)
- 2026-11-14T02:21:52.804Z · [OpenAI · official articles](https://openai.com/index/gpt-4-1)
> Introducing GPT‑4.1 in the API
**Uso confirmado**
- 2026-11-14T02:21:52.804Z · [OpenAI · official articles · Introducing GPT-4.1 in the API](https://openai.com/index/gpt-4-1)

## Enlaces de referencia

- [Artificial Analysis · benchmarks](https://artificialanalysis.ai/models)
- [review](https://developers.openai.com/api/docs/models/gpt-4.1)
- [openai-pricing](https://developers.openai.com/api/docs/pricing)
- [GitHub · openai/codex · code](https://github.com/openai/codex/blob/627b579219d492b5445d6d433d3110eb53e507dc/codex-rs/apply-patch/src/parser.rs)
- [GitHub · openai/codex · code](https://github.com/openai/codex/blob/82e6bacb9c6950d3b56cb153847fa80bdd698053/codex-rs/apply-patch/src/parser.rs)
- [GitHub · openai/openai-agents-js · code](https://github.com/openai/openai-agents-js/blob/7589b9c40120b89a7d2d28a5a60b4defe1ed7bf5/packages/agents-core/src/sandbox/capabilities/compaction.ts)
- [GitHub · openai/openai-agents-python · code](https://github.com/openai/openai-agents-python/blob/d68961657843c7d81dfc25834484f8aac2957eb3/docs/ja/models/index.md)
- [GitHub · openai/openai-agents-python · code](https://github.com/openai/openai-agents-python/blob/d68961657843c7d81dfc25834484f8aac2957eb3/src/agents/extensions/models/litellm_provider.py)
- [GitHub · openai/openai-node · code](https://github.com/openai/openai-node/blob/b579bcb3e586d22269ffe6fe504653a0e05acbe8/src/resources/beta/assistants.ts)
- [GitHub · openai/openai-python · code](https://github.com/openai/openai-python/blob/0ebd00647f6088fb100b03440c6c4554bbab549d/src/openai/types/beta/beta_responses_client_event.py)
- [openai-chatgpt-release-notes](https://help.openai.com/en/articles/6825453-chatgpt-release-notes)
- [openai-model-release-notes](https://help.openai.com/en/articles/9624314-model-release-notes)
- [models.dev · catalogue](https://models.dev/#gpt-4.1)
- [openai-articles](https://openai.com/index/gpt-4-1)
- [review](https://openai.com/index/gpt-4-1/)
- [openai-articles](https://openai.com/index/healthbench)
- [OpenAI · official articles](https://openai.com/index/introducing-gpt-5-2)
- [openai-articles](https://openai.com/index/introducing-gpt-5-for-developers)
- [openai-articles](https://openai.com/index/introducing-o3-and-o4-mini)
- [discovery:opencode-data](https://opencode.ai/data/openai/gpt-4-1)
- [openrouter](https://openrouter.ai/openai/gpt-4.1)
- [openrouter](https://openrouter.ai/openai/gpt-4.1:batch)
- [Vercel AI Gateway](https://vercel.com/ai-gateway)

## Señales

- [GPT-4.1: Disponibilidad en API](https://alexgetman.com/es/signals/2026/09/27/gpt-4-1-2/)
