OpenAI API
Access OpenAI instantly with Puter.js, and add AI to any app in a few lines of code without backend or API keys.
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
puter.ai.chat("Explain AI like I'm five!", {
model: "openai/gpt-5.2-chat"
}).then(response => {
console.log(response);
});
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat("Explain AI like I'm five!", {
model: "openai/gpt-5.2-chat"
}).then(response => {
console.log(response);
});
</script>
</body>
</html>
List of OpenAI Models
GPT-5.2
openai/gpt-5.2
GPT-5.2 is OpenAI's flagship model for professional knowledge work and coding, outperforming industry professionals on GDPval across 44 occupations. It excels at spreadsheets, presentations, code, and complex multi-step projects.
ChatGPT-5.2 Chat
openai/gpt-5.2-chat
GPT-5.2 Chat is the ChatGPT-optimized variant of GPT-5.2 with an August 2025 knowledge cutoff. It provides conversational interactions with the latest world knowledge before requiring web search.
ChatGPT-5.2 Codex
openai/gpt-5.2-codex
GPT-5.2 Codex is OpenAI's most advanced agentic coding model for professional software engineering and defensive cybersecurity. It achieves state-of-the-art on SWE-Bench Pro with improved long-horizon work through context compaction.
ChatGPT-5.2 Pro
openai/gpt-5.2-pro
GPT-5.2 Pro is a version of GPT-5.2 that thinks longer to produce smarter and more precise responses for challenging problems. It supports medium, high, and xhigh reasoning effort settings.
ImageGPT Image 1.5
openai/gpt-image-1.5
GPT Image 1.5 is OpenAI's latest and most advanced image generation model released in December 2025, offering better instruction following, precise editing, and up to 4x faster generation than GPT Image 1. It maintains details during edits, improves on premature cropping and color bias issues, and is 20% cheaper than its predecessor. This model powers the ChatGPT Images feature and represents the current state-of-the-art in OpenAI's image generation lineup.
ChatGPT-5.1 Codex Max
openai/gpt-5.1-codex-max
GPT-5.1 Codex Max is OpenAI's frontier agentic coding model built for long-running, detailed work using context compaction. It's the first model trained to operate across multiple context windows coherently.
ImageGPT Image 1 Mini
openai/gpt-image-1-mini
GPT Image 1 Mini is OpenAI's cost-optimized image generation model released in October 2025, offering the same capabilities as GPT Image 1 at approximately 80% lower cost. It's designed for high-throughput production use cases where cost and latency are priorities over peak image fidelity. The model trades some fine detail and photorealism for significantly reduced pricing.
ChatGPT-5.1
openai/gpt-5.1
GPT-5.1 is OpenAI's model that dynamically adapts reasoning time based on task complexity, making it faster and more token-efficient on simpler tasks. It features 8 customizable personalities and supports multimodal inputs.
ChatGPT-5.1 Chat
openai/gpt-5.1-chat
GPT-5.1 Chat is the conversational variant of GPT-5.1 used in ChatGPT with a warmer personality by default. It's available as gpt-5.1-chat-latest in the API for non-reasoning chat interactions.
ChatGPT-5.1 Codex
openai/gpt-5.1-codex
GPT-5.1 Codex is a version of GPT-5.1 optimized for agentic coding tasks in Codex or similar environments. It's designed for long-running coding workflows with enhanced code generation capabilities.
ChatGPT-5.1 Codex Mini
openai/gpt-5.1-codex-mini
GPT-5.1 Codex Mini is a smaller, more cost-effective version of GPT-5.1 Codex providing approximately 4x more usage within subscription limits. It balances coding capability with efficiency.
ChatGPT-OSS 120B
openai/gpt-oss-120b
GPT-OSS 120B is OpenAI's most powerful open-weight model under Apache 2.0 license, achieving near-parity with o4-mini on reasoning benchmarks. It has 117B total parameters with 5.1B active, fitting on a single H100 GPU.
ChatGPT-OSS 20B
openai/gpt-oss-20b
GPT-OSS 20B is OpenAI's smaller open-weight model for lower latency and local inference, matching o3-mini on common benchmarks. It requires only 16GB of memory and runs on consumer hardware.
ChatGPT-OSS Safeguard 20B
openai/gpt-oss-safeguard-20b
GPT-OSS Safeguard 20B is a safety-focused variant of the 20B open-weight model with additional content moderation capabilities. It includes enhanced safeguards for responsible deployment.
ChatGPT-5 Codex
openai/gpt-5-codex
GPT-5 Codex is a version of GPT-5 optimized for agentic coding tasks in Codex or similar environments. It's designed for software engineering workflows with enhanced code generation capabilities.
ChatOpenAI o3 Pro
openai/o3-pro
OpenAI o3 Pro is a version of o3 designed to think longer and provide the most reliable responses for challenging questions. It's recommended when reliability matters more than speed.
ChatGPT-5 Pro
openai/gpt-5-pro
GPT-5 Pro is an enhanced version of GPT-5 that thinks longer using parallel test-time compute to provide the highest quality answers. It replaces o3-pro for complex enterprise and research tasks.
ChatGPT-5
openai/gpt-5
GPT-5 is OpenAI's unified reasoning system combining a fast model, a deeper thinking model, and an automatic router. It achieves 45% fewer factual errors than GPT-4o and sets state-of-the-art scores on math, coding, and health benchmarks.
ChatGPT-5 Chat
openai/gpt-5-chat
GPT-5 Chat is the non-reasoning version of GPT-5 used in ChatGPT, designed for conversational interactions. It's available as gpt-5-chat-latest in the API and provides fast responses without extended thinking.
ChatGPT-5 Mini
openai/gpt-5-mini
GPT-5 Mini is a faster, more cost-efficient version of GPT-5 optimized for well-defined tasks and precise prompts. It provides a balance between performance and speed for everyday use cases.
ChatGPT-5 Nano
openai/gpt-5-nano
GPT-5 Nano is OpenAI's fastest and cheapest GPT-5 variant, ideal for summarization and classification tasks. It offers extremely low latency for high-volume, simple inference workloads.
ChatOpenAI o3 Deep Research
openai/o3-deep-research
OpenAI o3 Deep Research is a powerful model that searches and synthesizes hundreds of sources to create comprehensive research reports. It's optimized for browsing and data analysis at research analyst level.
ChatOpenAI o4 Mini Deep Research
openai/o4-mini-deep-research
OpenAI o4 Mini Deep Research is a faster, more affordable deep research model for complex multi-step research tasks. It can synthesize information from web search and internal data sources.
ImageGPT Image 1
openai/gpt-image-1
GPT Image 1 is OpenAI's natively multimodal image generation model released in April 2025, built on GPT-4o architecture to accept both text and image inputs. It excels at text rendering, detailed instruction following, and photorealistic output with support for image editing and inpainting. The model uses an autoregressive approach rather than diffusion, representing a significant advancement over the DALL·E series.
ChatOpenAI o3
openai/o3
OpenAI o3 is a powerful reasoning model that pushes the frontier in coding, math, science, and visual perception. It can agentically use all ChatGPT tools and makes 20% fewer major errors than o1 on difficult tasks.
ChatOpenAI o4 Mini
openai/o4-mini
OpenAI o4 Mini is a fast, cost-efficient reasoning model optimized for coding and visual tasks. It achieves remarkable performance for its size with full tool access in ChatGPT, succeeded by GPT-5 Mini.
ChatOpenAI o4 Mini High
openai/o4-mini-high
OpenAI o4 Mini High is a higher-intelligence version of o4-mini available in the ChatGPT model picker. It provides enhanced reasoning at the cost of longer response times.
ChatGPT-4.1
openai/gpt-4.1
GPT-4.1 is OpenAI's smartest non-reasoning model, excelling at instruction following and tool calling with a 1M token context window. It outperforms GPT-4o across coding and multimodal tasks with a June 2024 knowledge cutoff.
ChatGPT-4.1 Mini
openai/gpt-4.1-mini
GPT-4.1 Mini is a smaller, faster version of GPT-4.1 that matches or exceeds GPT-4o performance while reducing latency by nearly half and cost by 83%. It features a 1M token context window and strong coding capabilities.
ChatGPT-4.1 Nano
openai/gpt-4.1-nano
GPT-4.1 Nano is OpenAI's fastest and cheapest model, designed for low-latency tasks like classification and autocompletion. It features a 1M token context window and scores 80.1% on MMLU despite its small size.
VideoSora 2
openai/sora-2
Sora 2 is OpenAI's video and audio generation model designed for speed and flexibility, ideal for rapid iteration, concepting, and social media content where quick turnaround matters more than ultra-high fidelity. It generates videos from text prompts or images with synchronized dialogue and sound effects.
VideoSora 2 Pro
openai/sora-2-pro
Sora 2 Pro is OpenAI's state-of-the-art, most advanced media generation model that produces higher quality, more polished and stable video results with synced audio. It takes longer to render and costs more, but is best for high-resolution cinematic footage, marketing assets, and production-quality output where visual precision is critical.
ChatOpenAI: GPT Audio
openai/gpt-audio
OpenAI: GPT Audio Mini
openai/gpt-audio-mini
OpenAI o1 Pro
openai/o1-pro
OpenAI o1 Pro is a version of o1 with more compute for better responses, designed to think longer and provide the most reliable answers. It's the most expensive model at $150/1M input tokens.
ChatGPT-4o Mini Search Preview
openai/gpt-4o-mini-search-preview
GPT-4o Mini Search Preview is a specialized model trained for web search queries in the Chat Completions API. It's a fast, affordable option for search-enabled applications.
ChatGPT-4o Search Preview
openai/gpt-4o-search-preview
GPT-4o Search Preview is a specialized model for web search in Chat Completions, trained to understand and execute search queries. It returns responses with embedded citations and source references.
ChatGPT-4.5 Preview (Deprecated)
openai/gpt-4.5-preview
GPT-4.5 Preview was OpenAI's largest pre-trained model focused on scaling unsupervised learning for improved creativity and reduced hallucinations. It has been deprecated in favor of GPT-4.1 and GPT-5 models.
ChatOpenAI o3 Mini
openai/o3-mini
OpenAI o3 Mini is a cost-efficient reasoning model specialized for STEM domains requiring precision and speed. It features three reasoning effort levels (low, medium, high) and supports function calling.
ChatOpenAI o3 Mini High
openai/o3-mini-high
OpenAI o3 Mini High is a higher-intelligence version of o3-mini that takes longer to generate more accurate responses. It uses high reasoning effort for complex STEM and coding tasks.
ChatOpenAI o1
openai/o1
OpenAI o1 is a reasoning model that thinks before answering using chain-of-thought, excelling at complex science and mathematics tasks. It was the first in OpenAI's "o" series designed for step-by-step logical reasoning.
ChatGPT-4o 2024-11-20
openai/gpt-4o-2024-11-20
GPT-4o 2024-11-20 is a November 2024 snapshot of GPT-4o providing the latest improvements at that time. It's useful for applications requiring locked model behavior.
ChatGPT-4o Extended
openai/gpt-4o:extended
GPT-4o Extended is a variant of GPT-4o with extended capabilities or context for specific use cases. It provides enhanced features beyond the standard GPT-4o model.
ChatGPT-4o Audio Preview
openai/gpt-4o-audio-preview
GPT-4o Audio Preview is a model for audio inputs and outputs with the Chat Completions API. It enables speech-in, speech-out conversational interactions and audio generation capabilities.
ChatOpenAI o1 Mini (Deprecated)
openai/o1-mini
OpenAI o1 Mini was a faster, more affordable reasoning model alternative to o1, now deprecated in favor of o3-mini. It provided STEM-focused reasoning at lower cost and latency.
ChatChatGPT-4o Latest
openai/chatgpt-4o-latest
ChatGPT-4o Latest is the GPT-4o model variant used in ChatGPT, not recommended for API use. It's optimized for ChatGPT's conversational interface rather than developer applications.
ChatGPT-4o 2024-08-06
openai/gpt-4o-2024-08-06
GPT-4o 2024-08-06 is an August 2024 snapshot of GPT-4o with improvements and Structured Outputs support. It offers enhanced reliability for applications needing specific version behavior.
ChatGPT-4o Mini
openai/gpt-4o-mini
GPT-4o Mini is a fast, affordable small model that scores 82% on MMLU and accepts text and image inputs. It's over 60% cheaper than GPT-3.5 Turbo while offering superior reasoning and coding capabilities.
ChatGPT-4o Mini 2024-07-18
openai/gpt-4o-mini-2024-07-18
GPT-4o Mini 2024-07-18 is the initial release snapshot of GPT-4o Mini from July 2024. It provides version-locked behavior for consistent performance in production applications.
ChatGPT-4o
openai/gpt-4o
GPT-4o ("omni") is OpenAI's multimodal model capable of processing text, audio, images, and video inputs while generating text and images. It offers 4x faster responses than GPT-4 with superior non-English language and vision performance.
ChatGPT-4o 2024-05-13
openai/gpt-4o-2024-05-13
GPT-4o 2024-05-13 is the initial release snapshot of GPT-4o from May 2024. It provides version-locked behavior for applications requiring consistent model performance.
ChatGPT-4 Turbo
openai/gpt-4-turbo
GPT-4 Turbo is an older high-intelligence model designed as a cheaper, faster version of GPT-4 with a 128K context window. OpenAI now recommends using newer models like GPT-4o instead.
ChatGPT-4 Turbo Preview (Deprecated)
openai/gpt-4-turbo-preview
GPT-4 Turbo Preview is a deprecated research preview of GPT-4 Turbo. It was an early fast GPT model that has been superseded by production releases.
ChatGPT-4 1106 Preview
openai/gpt-4-1106-preview
GPT-4 1106 Preview is a November 2023 preview of GPT-4 Turbo with improved instruction following and JSON mode. It's a deprecated preview version superseded by GPT-4 Turbo's general release.
ImageDALL·E 3
openai/dall-e-3
DALL·E 3 is OpenAI's 2023 text-to-image model that generates higher-quality images at 1024x1024, 1024x1792, or 1792x1024 resolutions with improved prompt understanding and detail rendering. It integrates with ChatGPT for automatic prompt enhancement and offers 'vivid' and 'natural' style options. DALL·E 3 is now deprecated with support ending in May 2026.
ChatGPT-3.5 Turbo Instruct
openai/gpt-3.5-turbo-instruct
GPT-3.5 Turbo Instruct is an instruction-following model using the Completions API rather than Chat Completions. It's designed for single-turn instruction tasks rather than multi-turn conversations.
ChatGPT-3.5 Turbo 0613
openai/gpt-3.5-turbo-0613
GPT-3.5 Turbo 0613 is a snapshot of GPT-3.5 Turbo from June 2023, providing consistent behavior for applications requiring a locked model version. It's a legacy model with limited support.
ChatGPT-3.5 Turbo 16K
openai/gpt-3.5-turbo-16k
GPT-3.5 Turbo 16K is a variant with an extended 16,384 token context window, allowing processing of longer documents. It's a legacy model superseded by newer models with larger contexts.
ChatGPT-4
openai/gpt-4
GPT-4 is an older high-intelligence GPT model that understands and generates complex text for creative writing, data analysis, and code generation. It has a 23,000-25,000 word context window.
ChatGPT-4 0314
openai/gpt-4-0314
GPT-4 0314 is a snapshot of GPT-4 from March 2023, providing consistent behavior for applications requiring a specific model version. It's a legacy snapshot with limited ongoing support.
ChatGPT-3.5 Turbo
openai/gpt-3.5-turbo
GPT-3.5 Turbo is a legacy GPT model optimized for chat and non-chat tasks at low cost. As of July 2024, OpenAI recommends using GPT-4o Mini instead as it's cheaper, more capable, and multimodal.
ImageDALL·E 2
openai/dall-e-2
DALL·E 2 is OpenAI's earlier text-to-image model released in 2022 that generates images up to 1024x1024 pixels and supports inpainting, outpainting, and image variations. It offers more control in prompting and allows multiple images per request but produces lower quality results than newer models. DALL·E 2 is now deprecated and will be discontinued in May 2026.
Frequently Asked Questions
The OpenAI API gives you access to models for AI chat, image generation, and video generation. Through Puter.js, you can start using OpenAI models instantly with zero setup or configuration.
Puter.js supports a variety of OpenAI models, including GPT-5.2, GPT-5.2 Chat, GPT-5.2 Codex, and more. Find all AI models supported by Puter.js in the AI model list.
With the User-Pays model, users cover their own AI costs through their Puter account. This means you can build apps without worrying about infrastructure expenses.
Puter.js is a JavaScript library that provides access to AI, storage, and other cloud services directly from a single API. It handles authentication, infrastructure, and scaling so you can focus on building your app.
Yes — the OpenAI API through Puter.js works with any JavaScript framework, Node.js, or plain HTML. Just include the library and start building. See the documentation for more details.