OpenAI
GPT-4
Released 
March 14, 2023

OpenAI
GPT-4

OpenAI's original GPT-4 model for reproducible Chat Completions workloads where behavior must stay pinned and unchanged.

Modality:
Text
model ID
openai/gpt-4

Output Speed

n/a
tok/s

Intelligence Index

1
/ 100

Context Window

8192
tokens

Input price

180
Anytoken

Output price

360
Anytoken
GPT-4: The Original High-Intelligence Model, Now a Pinned Legacy Endpoint GPT-4 is OpenAI's original high-intelligence GPT model, released in March 2023 and still reachable through the Chat Completions API. It was the first model in the series to set state-of-the-art results across academic and professional evaluations and to introduce reliable function calling. In the current OpenAI lineup it is a legacy endpoint: successors like GPT-4o and GPT-4.1 exceed it on context, speed, cost, and coding. GPT-4 remains relevant mainly for teams that need behavior pinned to the original model for reproducibility or regulated audit requirements. Access GPT-4 and its successors through one AnyAPI.ai integration.

Performance

Where GPT-4 Still Holds Up: Broad Reasoning and Multilingual Coverage

GPT-4's strength is broad, reliable reasoning across knowledge-intensive tasks rather than raw speed or throughput. OpenAI reported 86.4% on MMLU (5-shot) and 67.0% on HumanEval (0-shot), and GPT-4 surpassed the English-language state of the art in 24 of 26 translated MMLU languages. That multilingual and reasoning breadth is why the model remained a default for professional and academic workloads for years. In production today its practical value is consistency: pinned snapshots behave predictably, which matters where outputs must be auditable or reproducible across long-lived deployments.

Benchmarks

GPT-4 Benchmarks: Original Technical Report Results in Context

OpenAI's GPT-4 Technical Report measured 86.4% on MMLU (5-shot) and 67.0% on HumanEval (0-shot), both large gains over GPT-3.5 at the time of release. Independent evaluations of the gpt-4-1106-preview snapshot later placed HumanEval near 85%, reflecting improvements across GPT-4 snapshots. These numbers established GPT-4 as a reasoning and multilingual leader in 2023, but later OpenAI models measurably exceed it on coding and instruction following. When reading GPT-4 benchmarks, confirm the exact snapshot, as base gpt-4, gpt-4-0613, and the turbo previews differ in behavior.

Output Speed

n/a
tok/s

Intelligence Index

1
/ 100

MMLU

Broad world knowledge and problem-solving
56
%

GPQA

PhD-level scientific reasoning across physics, biology, chemistry.
35
%

HLE

Adherence to multi-step structured instructions.
0
%

LiveCodeBench

Tool-calling reliability in long agentic loops.
0
%

Technical Specifications

What the model supports

The base GPT-4 (gpt-4-0613) model accepts text input and produces text output, with an 8,192-token context window and up to 8,192 output tokens. The most consequential limit for developers is the small context window: 8K tokens is far below GPT-4o (128K) and GPT-4.1 (1M), which rules out large-document RAG, long transcripts, or extended agent traces. GPT-4 supports function calling but, per OpenAI's model page, does not support structured outputs. Snapshots let teams pin behavior; the alias is grouped with gpt-4-0613 for deprecation.
Verified Specifications — 
GPT-4
Input modalities
Text
output modalities
Text
Context window
8192
 tokens
Maximum output tokens
4096
Reasoning
No
Knowledge cutoff
March 14, 2023
Pricing (standard)
180
 AnyTokens in
 / 
360
 AnyTokens out

Quickstart

Sample code for GPT-4

import requests

url = "https://api.anyapi.ai/v1/chat/completions"

payload = {
    "model": "gpt-4",
    "messages": [
        {
            "role": "user",
            "content": "Hello"
        }
    ]
}
headers = {
    "Authorization": "Bearer  AnyAPI_API_KEY",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
import requests url = "https://api.anyapi.ai/v1/chat/completions" payload = { "model": "gpt-4", "messages": [ { "role": "user", "content": "Hello" } ] } headers = { "Authorization": "Bearer AnyAPI_API_KEY", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json())
View docs
Copy
Code is copied
const url = 'https://api.anyapi.ai/v1/chat/completions';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer  AnyAPI_API_KEY', 'Content-Type': 'application/json'},
  body: '{"model":"gpt-4","messages":[{"role":"user","content":"Hello"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = 'https://api.anyapi.ai/v1/chat/completions'; const options = { method: 'POST', headers: {Authorization: 'Bearer AnyAPI_API_KEY', 'Content-Type': 'application/json'}, body: '{"model":"gpt-4","messages":[{"role":"user","content":"Hello"}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); }
View docs
Copy
Code is copied
curl --request POST \
  --url https://api.anyapi.ai/v1/chat/completions \
  --header 'Authorization: Bearer  AnyAPI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-4",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}'
curl --request POST \ --url https://api.anyapi.ai/v1/chat/completions \ --header 'Authorization: Bearer AnyAPI_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "model": "gpt-4", "messages": [ { "role": "user", "content": "Hello" } ] }'
View docs
Copy
Code is copied
View docs
Code examples coming soon...

Comparison

GPT-4 vs GPT-4o: What Changes When You Migrate?

GPT-4 and GPT-4o are natural comparison points because GPT-4o is OpenAI's successor to the original GPT-4 line for general Chat Completions work. Both are high-intelligence text models reachable through the same API surface, and both support function calling. The practical decision is almost always about capability versus continuity: GPT-4o expands the context window to 128,000 tokens, adds image input and structured outputs, runs faster, and costs less, while GPT-4 offers a fixed, well-understood behavior profile that some regulated or long-lived deployments were built and validated against.

Dimension
GPT-4
GPT-4o
Context window
8192
tokens
128000
tokens
Output speed
n/a
tok/s
135
tok/s
Intelligence Index
1
9.4
Input pricing
180
AnyToken
15
AnyToken
Output pricing
360
AnyToken
60
AnyToken
Knowledge cutoff
March 14, 2023
May 2024

Choose GPT-4 when you need behavior pinned to the original model for reproducibility, auditability, or to avoid re-validating a system already certified against a specific snapshot, and your prompts fit within 8K tokens. Choose GPT-4o when you need a larger context window, image input, structured outputs, higher throughput, and lower cost, which covers virtually all new development. For most greenfield projects GPT-4o or GPT-4.1 is the better default; GPT-4 is a maintenance and continuity choice, especially given its deprecation trajectory.

Limitations & Trade-offs

Where GPT-4 falls short

1
Small 8K context window. GPT-4's base snapshot exposes only an 8,192-token window shared between input and output, versus 128K on GPT-4o and 1M on GPT-4.1. This rules out large-document RAG, long transcripts, multi-file code review, and extended agent traces without aggressive chunking. Any workload that depends on wide context should use a newer model.
2
No structured outputs. Per OpenAI's model documentation, GPT-4 does not support the Structured Outputs feature, and on OpenAI's own JSON-schema-following eval gpt-4-0613 scored under 40% while gpt-4o-2024-08-06 reached 100%. Function calling works, but if you need guaranteed schema conformance for data extraction or tool arguments, a newer model with strict structured outputs is more reliable.
3
Deprecation and shutdown risk. GPT-4 is a legacy endpoint. OpenAI's deprecation notes group the gpt-4 alias with the gpt-4-0613 snapshot and name gpt-5.6-sol as the recommended replacement, with gpt-4-0314 already shut down and gpt-4-0613 scheduled for retirement. Building new production systems on GPT-4 creates migration debt; treat it as maintenance-only.
4
Text-only, no vision or audio. The base gpt-4-0613 endpoint accepts text input and produces text output only. Although OpenAI's original research described GPT-4 as a multimodal model, image input in the API arrived through separate vision-capable snapshots and later models. Workloads needing document images, charts, or screenshots should use GPT-4o.

Best-Fit Workloads

Where this model earns its place

01

Reproducible reasoning under audit


For regulated or long-lived systems validated against a specific model version, GPT-4's pinned snapshots (gpt-4-0613) provide stable, predictable behavior. This matters where outputs must be auditable and re-validation is costly. The constraint is the deprecation timeline: plan a migration path even when using GPT-4 for continuity, since the snapshot is scheduled for shutdown.

02

Multilingual knowledge tasks


GPT-4 surpassed the English-language state of the art on translated MMLU in 24 of 26 languages, making it a strong option for knowledge-intensive question answering across languages within a single model. It suits professional and academic Q&A where prompts fit inside the 8K window. For higher volume or larger context, GPT-4o offers comparable multilingual quality at lower cost.

03

Legacy tool-calling integrations


GPT-4 was the model that introduced reliable function calling (gpt-4-0613), so existing integrations that emit JSON tool-call arguments continue to work unchanged. This fits maintenance of established agent or plugin systems. New builds should prefer models with strict structured outputs, since GPT-4 scored under 40% on OpenAI's JSON-schema-following eval.

04

Multilingual assistants and Q&A


GPT-4's demonstrated strength across languages, surpassing prior state of the art on translated MMLU in 24 of 26 languages, makes it suitable for assistants and knowledge tools serving global audiences. Applications that require consistent reasoning quality across many languages within short-to-moderate prompts benefit here, provided the 8,192-token budget is respected.

Pricing in anytokens via AnyAPI
Input
180
Output
360
Cache write
Cache read

Integration

Access GPT-4 via AnyAPI.ai

Access GPT-4 through AnyAPI.ai using a unified API built for multi-model AI applications. Integrate GPT-4 without maintaining a separate provider-specific connection, and keep the flexibility to test, switch, or combine models as your application requirements evolve.

01

One API integration

Access GPT-4 and other AI models through the same API workflow instead of maintaining separate integrations for every provider.

02

Easy model switching

Test GPT-4 against alternative models or switch models as your performance, capability, or cost requirements change without rebuilding your application around another provider API.

03

Flexible for production

Use GPT-4 from experimentation through production while keeping your AI stack flexible as workloads, traffic, and model requirements evolve.

04

Multi-model applications

Use GPT-4 for the workloads where it performs best and combine it with other models for tasks that require different capabilities, performance, or efficiency.

Frequently Asked Questions

Answers to common questions about integrating and using this AI model via AnyAPI.ai

The base GPT-4 model (gpt-4-0613) has an 8,192-token context window and a maximum output of 8,192 tokens, shared with the input. This is much smaller than GPT-4o at 128,000 tokens and GPT-4.1 at roughly 1 million tokens, so GPT-4 is unsuitable for large-document or long-context workloads.

No. The base gpt-4-0613 endpoint accepts text input and produces text output only. While OpenAI's original research described GPT-4 as a multimodal model, image understanding in the API came through separate vision-capable snapshots and later models like GPT-4o. Use GPT-4o for image and document analysis.

GPT-4 supports function calling, which it originally introduced with the gpt-4-0613 snapshot, allowing the model to return JSON tool-call arguments. However, per OpenAI's documentation it does not support the Structured Outputs feature that guarantees schema conformance. For strict schema-following, use a newer model such as GPT-4o.

GPT-4 remains reachable through the Chat Completions API but is a legacy, deprecated endpoint. OpenAI groups the gpt-4 alias with gpt-4-0613 for deprecation and names a current GPT-5-series model as the recommended replacement. For new projects, GPT-4o or GPT-4.1 are better defaults; reserve GPT-4 for reproducibility or continuity needs.

GPT-4o is the successor to GPT-4 and improves on it across the board: a 128,000-token context window, image input, structured outputs, faster responses, and lower cost. GPT-4's main advantage is pinned, well-understood behavior for systems already validated against it. Most workloads should prefer GPT-4o.