Retour à tous les articles

Offre pour développeurs

Essayez l'API ImaginePro avec 50 crédits gratuits

Créez des visuels propulsés par l'IA avec Midjourney, Flux et plus encore — les crédits gratuits se renouvellent chaque mois.

Commencer l'essai gratuit

Choosing The Right OpenAI Codex Model

2025-11-14Unknown5 minutes de lecture
Codex
OpenAI
AI Programming

Meet the Latest Codex Models

OpenAI offers a suite of Codex models tailored for different programming needs, from complex, long-running agentic tasks to faster, more cost-effective solutions. Here’s a look at the primary models available, helping you choose the best fit for your project.

gpt-5.1-codex

This model is optimized for intensive, long-running, and agentic coding tasks. It's the powerhouse of the Codex family and serves as the default model for macOS and Linux users. It is also the exclusive model used for Codex Cloud tasks.

To use it in the command line: bash codex -m gpt-5.1-codex

Features & Pricing

FeatureAvailability
Capability✨✨✨✨
Speed⚡️⚡️⚡️
Codex CLI & SDK✅ Yes
Codex IDE Extension✅ Yes
Codex Cloud✅ Yes
API Access✅ Yes
Plan/APIRate (per 5h / 1M tokens)
ChatGPT Plus45-225 local messages / 10-60 cloud tasks
ChatGPT Pro300-1,500 local messages / 50-400 cloud tasks
API Input$1.25
API Cached Input$0.13
API Output$10.00

gpt-5.1-codex-mini

For developers looking for a more cost-effective and faster alternative, gpt-5.1-codex-mini offers a great balance. It's a smaller, less-capable version of the main Codex model but excels in speed, making it ideal for quicker tasks.

To use it in the command line: bash codex -m gpt-5.1-codex-mini

Features & Pricing

FeatureAvailability
Capability✨✨✨
Speed⚡️⚡️⚡️⚡️
Codex CLI & SDK✅ Yes
Codex IDE Extension✅ Yes
Codex Cloud❌ No
API Access✅ Yes
Plan/APIRate (per 5h / 1M tokens)
ChatGPT Plus180-900 local messages / 40-240 cloud tasks
ChatGPT Pro1,200-6,000 local messages / 200-1,600 cloud tasks
API Input$0.25
API Cached Input$0.03
API Output$2.00

gpt-5.1

This model is a strong generalist, great for a wide range of coding and agentic tasks across different domains. It is the default model for Windows users.

To use it in the command line: bash codex -m gpt-5.1

Features & Pricing

FeatureAvailability
Capability✨✨✨✨
Speed⚡️⚡️⚡️
Codex CLI & SDK✅ Yes
Codex IDE Extension✅ Yes
Codex Cloud❌ No
API Access✅ Yes
Plan/APIRate (per 5h / 1M tokens)
ChatGPT Plus45-225 local messages / 10-60 cloud tasks
ChatGPT Pro300-1,500 local messages / 50-400 cloud tasks
API Input$1.25
API Cached Input$0.13
API Output$10.00

How to Select Your Codex Model

You have several ways to configure which model Codex uses, whether you want to set a permanent default or make a temporary choice for a specific task.

Configure Your Default Local Model

Both the Codex CLI and the IDE Extension use a central configuration file named config.toml. To set your preferred default model, simply add a model entry to this file. If you don't specify one, the tool will select a default for you.

toml model="gpt-5.1-codex"

For users who frequently switch between models and settings, you can also set up different Codex profiles.

Temporarily Choosing a Different Local Model

If you need to switch models on the fly, you can use the /model command during an active session in the Codex CLI. In the IDE Extension, a model selector is available next to the input box.

To start a new CLI session or run a one-off command with a specific model, use the --model or -m flag.

bash codex -m gpt-5.1-codex-mini

Choosing Your Model for Cloud Tasks

Currently, there is no option to select a different model for Codex Cloud tasks. All cloud-based tasks are run using gpt-5.1-codex.

Legacy Codex Models

The following models have been succeeded by the newer versions listed above but may still be available for use.

  • gpt-5-codex: The predecessor to gpt-5.1-codex, this version was also tuned for long-running, agentic coding tasks.
  • gpt-5-codex-mini: A smaller, cost-effective version of gpt-5-codex that has been succeeded by gpt-5.1-codex-mini.
  • gpt-5: The original reasoning model for coding tasks, which has been succeeded by gpt-5.1.

Using Custom Models with Codex

Codex offers flexibility beyond its native models. If you are authenticating with an API key, you can point Codex to any model and provider that supports either the OpenAI Chat Completions or Responses APIs. This allows you to adapt the tool to your specific use case or infrastructure.

Lire l'article original

Comparer les plans et tarifs

Trouvez la formule adaptée à votre charge de travail et débloquez l'accès complet à ImaginePro.

Comparatif des tarifs ImaginePro
PlanTarifPoints clés
Standard$8 / mois
  • 300 crédits mensuels inclus
  • Accès aux modèles Midjourney, Flux et SDXL
  • Droits d'utilisation commerciale
Premium$20 / mois
  • 900 crédits mensuels pour les équipes en croissance
  • Plus de parallélisme et des livraisons plus rapides
  • Support prioritaire via Slack ou Telegram

Besoin de conditions personnalisées ? Parlons-en pour ajuster crédits, limites ou déploiements.

Voir tous les détails tarifaires
ImaginePro newsletter

Abonnez-vous à notre newsletter !

Abonnez-vous à notre newsletter pour recevoir les dernières nouvelles et créations.