GPT-5.2-Codex Is Now Available in Puter.js
On this page
Puter.js now supports GPT-5.2-Codex, OpenAI's most advanced agentic coding model. Add it to your application for free without needing an OpenAI developer account or API key.
What is GPT-5.2-Codex?
GPT-5.2-Codex is OpenAI's flagship model for professional software engineering and defensive cybersecurity. It builds on GPT-5.2 with optimizations for:
- Long-horizon work with large context window support
- Large code changes like refactors and migrations
- Stronger cybersecurity capabilities for defensive security work
GPT-5.2-Codex achieves state-of-the-art performance on industry benchmarks, scoring 56.4% on SWE-Bench Pro and 64.0% on Terminal-Bench 2.0.
Examples
Code Generation
puter.ai.chat(
"Write a Python function that implements a thread-safe singleton pattern with lazy initialization",
{ model: "openai/gpt-5.2-codex" }
)
Code Refactoring
puter.ai.chat(
"Refactor this class to use the repository pattern:\n\nclass UserService {\n getUser(id) { return db.query('SELECT * FROM users WHERE id = ?', [id]); }\n saveUser(user) { return db.query('INSERT INTO users VALUES (?)', [user]); }\n}",
{ model: "openai/gpt-5.2-codex" }
)
Security Analysis
puter.ai.chat(
"Analyze this code for security vulnerabilities and suggest fixes:\n\napp.get('/user', (req, res) => {\n const query = `SELECT * FROM users WHERE id = ${req.query.id}`;\n db.query(query, (err, result) => res.json(result));\n});",
{ model: "openai/gpt-5.2-codex" }
)
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 GPT-5.2-Codex immediately.
Learn more:
Free, Serverless AI and Cloud
Start creating powerful web applications with Puter.js in seconds!
Get Started Now