GPT-5.1-Codex-Max Is Now Available in Puter.js
On this page
Puter.js now supports GPT-5.1-Codex-Max, OpenAI's most powerful code generation model. Add it to your application for free without needing an OpenAI developer account or API key.
What is GPT-5.1-Codex-Max?
GPT-5.1-Codex-Max is OpenAI's flagship code generation model designed for the most demanding coding tasks. It excels at complex code generation, debugging, code explanation, and software architecture.
Examples
Code Generation
puter.ai.chat(
"Write a Python function that implements a binary search tree with insert, delete, and search operations",
{ model: "openrouter:openai/gpt-5.1-codex-max" }
)
Code Debugging
puter.ai.chat(
"Find and fix the bug in this code:\n\nfunction fibonacci(n) {\n if (n <= 1) return n;\n return fibonacci(n - 1) + fibonacci(n - 1);\n}",
{ model: "openrouter:openai/gpt-5.1-codex-max" }
)
Code Explanation
puter.ai.chat(
"Explain this regex pattern and what it matches: ^(?=.*[A-Z])(?=.*[a-z])(?=.*\\d)[A-Za-z\\d]{8,}$",
{ model: "openrouter:openai/gpt-5.1-codex-max" }
)
Other Codex Models
In addition to Codex Max, Puter.js also supports other Codex variants:
| Model | Best For |
|---|---|
openrouter:openai/gpt-5.1-codex-max |
Complex coding tasks requiring maximum capability |
openrouter:openai/gpt-5.1-codex |
Balanced performance for everyday coding tasks |
openrouter:openai/gpt-5.1-codex-mini |
Fast responses for simpler code generation |
Using GPT-5.1-Codex
puter.ai.chat(
"Write a function to validate email addresses",
{ model: "openrouter:openai/gpt-5.1-codex" }
)
Using GPT-5.1-Codex-Mini
puter.ai.chat(
"Write a function to reverse a string",
{ model: "openrouter:openai/gpt-5.1-codex-mini" }
)
Get Started Now
Just add one script tag to your HTML:
<script src="https://js.puter.com/v2/"></script>
No API keys or OpenAI developer account needed. Start building with Codex immediately.
Learn more:
Free, Serverless AI and Cloud
Start creating powerful web applications with Puter.js in seconds!
Get Started Now