
Share
Explore how OpenAI’s updated Codex models offer developers faster, more efficient coding with enhanced autonomy and intelligence, whether through the API or SDK.
If you’re diving into the latest advancements in AI-driven coding, OpenAI’s Codex models are a must-explore. The gpt-5.3-codex model, available via the API, brings significant improvements in efficiency, intelligence, and autonomy. This guide is designed for developers who want to leverage these enhancements directly through the API for maximum customizability. If you prefer a simpler integration, consider using the Codex SDK.
high or xhigh.gpt-5.3-codexIf you already have an existing Codex implementation, transitioning to the new model should be relatively smooth with minimal updates required. However, if you’re starting from scratch or optimizing your prompt and tools, here are some key points to consider:
To use the gpt-5.3-codex model via the OpenAI API, you’ll need to specify it in your request. Here’s a basic example of how to set up an API call:
import openai
openai.api_key = 'your-api-key'
response = openai.Completion.create(
engine="gpt-5.3-codex",
prompt="Write a function that calculates the factorial of a number.",
max_tokens=100,
temperature=0.7,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)
print(response.choices[0].text.strip())

medium for general tasks, high for more complex tasks, and xhigh for the most challenging ones.Let’s say you want to write a function that calculates the factorial of a number. Here’s how you can structure your prompt:
prompt = """
Write a Python function named `factorial` that takes an integer `n` and returns the factorial of `n`.
The factorial of a non-negative integer `n` is the product of all positive integers less than or equal to `n`.
For example, the factorial of 5 (5!) is 1 * 2 * 3 * 4 * 5 = 120.
"""
response = openai.Completion.create(
engine="gpt-5.3-codex",
prompt=prompt,
max_tokens=100,
temperature=0.7,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)
print(response.choices[0].text.strip())
Compaction is a powerful feature that allows the model to manage long-running sessions without hitting context limits. This is particularly useful for tasks that require extended reasoning or multi-step processes.
To enable compaction, you can use the compaction parameter in your API call:
response = openai.Completion.create(
engine="gpt-5.3-codex",
prompt="Write a function that calculates the factorial of a number.",
max_tokens=
Tags
Original Sources
About the author
Kai built ML infrastructure at a Bay Area startup before developing an obsession with transformer architectures and inference optimisation that eventually pulled him out of product work entirely. A stint at a compute research lab sharpened his instinct for what actually matters in a model release versus what is marketing. He writes from the inside — from the perspective of someone who has debugged the systems he is describing at three in the morning. He is allergic to hype and instinctively drawn to the unglamorous plumbing questions that everyone else skips over.
More from The Engineer →This Week's Edition
26 February 2026
133 articles
Related Articles
Related Articles
More Stories