Ship a Full-Stack App with One Prompt

Copy this prompt into your AI coding agent, or open it in one below.

Give this to your AI Create a to-do list app using Puter.js

Coding manually? see the guide

OpenAI

OpenAI: GPT-4

openai/gpt-4

Access GPT-4 from OpenAI using Puter.js AI API.

Get Started
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';

puter.ai.chat("Explain quantum computing in simple terms", {
    model: "openai/gpt-4"
}).then(response => {
    document.body.innerHTML = response.message.content;
});
<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.chat("Explain quantum computing in simple terms", {
            model: "openai/gpt-4"
        }).then(response => {
            document.body.innerHTML = response.message.content;
        });
    </script>
</body>
</html>
# pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://api.puter.com/puterai/openai/v1/",
    api_key="YOUR_PUTER_AUTH_TOKEN",
)

response = client.chat.completions.create(
    model="openai/gpt-4",
    messages=[
        {"role": "user", "content": "Explain quantum computing in simple terms"}
    ],
)

print(response.choices[0].message.content)
curl https://api.puter.com/puterai/openai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_PUTER_AUTH_TOKEN" \
  -d '{
    "model": "openai/gpt-4",
    "messages": [
      {"role": "user", "content": "Explain quantum computing in simple terms"}
    ]
  }'

Model Card

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.

Context Window 8K

tokens

Max Output 4K

tokens

Input Cost $22.5

per million tokens

Output Cost $45

per million tokens

Release Date May 28, 2023

 

Model Playground

Try GPT-4 instantly in your browser.
This playground uses the Puter.js AI API — no API keys or setup required.

Chat openai/gpt-4
OpenAI
Chat with GPT-4
Powered by Puter.js

Benchmarks

How GPT-4 performs on standard evaluations.

Artificial Analysis
Intelligence Index
1.5
Better than 21% of tracked models
Artificial Analysis
Coding Index
13.1
Better than 12% of tracked models
BenchmarkScore
GPQA Diamond Graduate-level science Q&A
34.9%
MATH-500 Competition math
56.8%
IFBench Instruction following
33.2%

Scores sourced from Artificial Analysis.

Find other OpenAI models

Chat

GPT-6 Astra

GPT-6 Astra is OpenAI's most capable model, released in September 2026 as the successor to GPT-5.6 Sol. It targets complex reasoning, coding, computer use, research, and document creation, taking text and image input over a 1,050,000-token context window and supporting tool calling. OpenAI reports Astra saturates FrontierMath Tier 4 at 97.6% and ARC-AGI-3 at 99.9%, and cuts its hallucination rate from 92% to 51% at max effort versus GPT-5.6 Sol. It is the first OpenAI model to reach the Critical cybersecurity level under OpenAI's Preparedness Framework, scoring 100% on ExploitBench versus 78.5% for GPT-5.6 Sol. Independent testing from Artificial Analysis puts Astra's Intelligence Index at 61.2, roughly level with GPT-5.6 Sol and behind Claude Fable 5.1's 65.7. Input costs $5 per million tokens and output $25 per million, 2.5 times GPT-5.6 Sol's rate.

Chat

GPT-6 Astra Pro

GPT-6 Astra Pro is OpenAI's higher-performance configuration of GPT-6 Astra, offered in ChatGPT to Pro, Business, and Enterprise subscribers. OpenAI has not published what separates it from the base model, whether a higher reasoning-effort ceiling, more compute per response, or fewer usage limits. It shares the same 1,050,000-token context window, 128,000 max output tokens, and $10/$50 per million token input/output pricing as base GPT-6 Astra. That overlap suggests Pro may simply be a higher-effort configuration of the same underlying model, a pattern also seen with GPT-5.6 Sol Pro. Base GPT-6 Astra supports adjustable reasoning effort from low to max, function calling, and image input, with an April 30, 2026 knowledge cutoff. It scores 67 on the Coding Agent Index and 61 on the Intelligence Index, near GPT-5.6 Sol and a few points behind Claude Fable 5.1. Whether these figures apply to the Pro configuration specifically is undocumented.

Chat

GPT-5.6 Sol

GPT-5.6 Sol is OpenAI's flagship model in the GPT-5.6 family, sitting above Terra and Luna as the most capable and most expensive of the three. It reached general availability on July 9, 2026. Sol is built for agentic coding, cybersecurity research, and long-horizon autonomous work. OpenAI reports it sets a new state of the art on Terminal-Bench 2.1, a benchmark for command-line workflows that require planning, iteration, and tool coordination, and describes it as the most capable model yet for cybersecurity tasks such as vulnerability research. The GPT-5.6 family adds a max reasoning effort setting, an ultra mode that coordinates subagents on complex tasks, and Programmatic Tool Calling in the Responses API. Sol carries a 1.05M token context window, 128,000 max output tokens, and a February 16, 2026 knowledge cutoff, making it best suited for teams that need the highest available capability and can absorb its premium per-token cost.

Frequently Asked Questions

How do I use GPT-4?

You can access GPT-4 by OpenAI through Puter.js AI API. Include the library in your web app or Node.js project and start making calls with just a few lines of JavaScript — no backend and no configuration required. You can also use it with Python or cURL via Puter's OpenAI-compatible API.

Is GPT-4 free?

Yes, it is free if you're using it through Puter.js. With the User-Pays Model, you can add GPT-4 to your app at no cost — your users pay for their own AI usage directly, making it completely free for you as a developer.

What is the pricing for GPT-4?
GPT-4 costs $22.5 per 1M input tokens and $45 per 1M output tokens.
Price per 1M tokens
Input$22.5
Output$45
Who created GPT-4?

GPT-4 was created by OpenAI and released on May 28, 2023.

What is the context window of GPT-4?

GPT-4 supports a context window of 8K tokens. For reference, that is roughly equivalent to 16 pages of text.

What is the max output length of GPT-4?

GPT-4 can generate up to 4K tokens in a single response.

How does GPT-4 perform on benchmarks?

GPT-4 scores 1.5 on the Artificial Analysis Intelligence Index, outperforming 21% of tracked models. On coding, it scores 13.1 (outperforms 12% of models).

Does it work with React / Vue / Vanilla JS / Node / etc.?

Yes — the GPT-4 API works with any JavaScript framework, Node.js, or plain HTML through Puter.js. Just include the library and start building. See the documentation for more details.

Get started with Puter.js

Add GPT-4 to your app without worrying about API keys or setup.

Read the Docs View Tutorials