Logo
Back to all models

GPT-4 - In-Depth Overview

OpenAI · GPT-4

outdated

Model ID: gpt-4

Get all the details on GPT-4, an AI model from OpenAI. This page covers its token limits, pricing structure, key capabilities such as streaming, legacy_completions, fine_tuning, available API code samples, and performance strengths.

Key Metrics

Input Limit

8.2K tokens

Output Limit

8.2K tokens

Input Cost

$30.00/1M

Output Cost

$60.00/1M

Sample API Code

from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
    model="gpt-4",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ]
)
print(response.choices[0].message.content)

Required Libraries

openai
openai

Benchmarks

BenchmarkScoreSourceNotes
1183
lmarena.aiScore for gpt-4-0314 snapshot
1160
lmarena.aiScore for gpt-4-0613 snapshot

Notes

An older version of a high-intelligence GPT model, usable in Chat Completions. It has an 8,192 context window and 8,192 max output tokens.

Supported Data Types

Input Types

text

Output Types

text

Strengths & Weaknesses

Exceptional at

high intelligence
complex reasoning

Good at

text generation
chat completions

Poor at

function calling
structured outputs
image input
audio input

Additional Information

Latest Update

Jun 13, 2023

Knowledge Cutoff

Dec 1, 2023