GPT-4

openai/gpt-4
ToolsJSON
by OpenAI · 2023-05-28

OpenAI's flagship model, GPT-4 is a large-scale multimodal language model capable of solving difficult problems with greater accuracy than previous models due to its broader general knowledge and advanced reasoning...

ctx8.2K tokens
Max output8.2K
Inputtext
Outputtext
p50 TTFT14.57 s
INPUT$30.00/ 1M tokens
OUTPUT$60.00/ 1M tokens
p50 TTFT14.57 s7d
p95 TTFT14.57 s7d
TRAFFIC12.6Ktokens / 7d

OpenAI GPT-4 is a large language model engineered for text-based tasks. It accepts only text inputs and generates text outputs. The model has a context window of 8,191 tokens and a maximum output…

What is OpenAI GPT-4 and how can I access it?

Who should use GPT-4?

What input modalities does GPT-4 support?

What is the context window and output limit of GPT-4?

Code samples

Call from any SDK

OpenAI-compatible — keep the SDK you already use

  • OpenAI SDKhttps://api.orcarouter.ai/v1
from openai import OpenAI

client = OpenAI(
    base_url="https://api.orcarouter.ai/v1",
    api_key="$ORCAROUTER_API_KEY",
)

response = client.chat.completions.create(
    model="openai/gpt-4",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Supported parameters

  • frequency_penalty
  • logit_bias
  • logprobs
  • max_tokens
  • presence_penalty
  • response_format
  • seed
  • stop
  • stream
  • temperature
  • tool_choice
  • tools
  • top_logprobs
  • top_p

Pricing

Input / 1M tokens$30.00
Output / 1M tokens$60.00
CurrencyUSD

Cost calculator

Tokens / month10MM
Input share70%%
Estimated / month $390

Estimate based on list price

Token & cost estimator

Input tokens: 20Cost per request: $0.0306

Estimate only — actual token counts depend on the provider's tokenizer.

Performance

p50 TTFT
14.57 s
Output speed
1458 tok/s
p95 TTFT
14.57 s
Error rate
0%

Public benchmarks

13.1
AA Coding
Better than 8% of models compared
#112 of 123
7.0
AA Intelligence
Better than 6% of models compared
#117 of 125
Source: artificialanalysis.ai

How it compares

GPT-4GPT-5.2 ProGPT-5.4 ProGPT-5.5
Input $/M$30.00$21.00$60.00$5.00
Output $/M$60.00$168.00$270.00$30.00
Context8K400K1.1M
Quality2/1010/1010/1010/10
Compare side-by-sideCompare side-by-sideCompare side-by-sideCompare side-by-side

FAQ

What is the cost of using GPT-4 on OrcaRouter?
GPT-4 pricing on OrcaRouter is $30.00 per 1 million input tokens and $60.00 per 1 million output tokens, billed at the provider rate with zero markup. There are no additional fees. You pay only for tokens consumed.
What is the context window size of GPT-4?
GPT-4 has a context window of 8,191 tokens. This includes both your input messages and the generated output. The maximum output you can request is 8,192 tokens, but the effective limit depends on input length.
What are the main strengths of GPT-4?
GPT-4 excels at reasoning, creative writing, code generation, and complex instruction following. It achieves a score of 13.1 on the AA Coding benchmark, indicating strong programming capability. It is a text-only model with consistent performance across diverse tasks.
How does GPT-4 compare to GPT-3.5-Turbo?
GPT-4 is more capable in complex tasks but more expensive. GPT-3.5 has a larger context window (16,384 tokens) and is cheaper. Choose GPT-4 for higher quality output; choose GPT-3.5 for budget-sensitive or simpler tasks.
Does OrcaRouter store or share my data when using GPT-4?
OrcaRouter's data handling policies should be reviewed in their documentation. Typically, API providers log minimal data for billing and abuse prevention. For specific data retention and sharing practices, refer to OrcaRouter's privacy policy and terms of service.
How do I call GPT-4 via an OpenAI-compatible API on OrcaRouter?
Set your API base URL to https://api.orcarouter.ai/v1, use your OrcaRouter API key, and specify model "openai/gpt-4" in the request body. You can use any OpenAI SDK by changing the base_url. Example: client = OpenAI(api_key="sk-orcarouter...", base_url="https://api.orcarouter.ai/v1").
Can I stream responses from GPT-4 on OrcaRouter?
Yes. Set the parameter "stream": true in your API request. OrcaRouter supports streaming responses in the OpenAI format. Your client can iterate over chunks as they arrive.
Is GPT-4 multimodal?
No. GPT-4 only accepts text inputs. It cannot process images, audio, or video. For multimodal tasks, consider models like GPT-4 Vision or Claude 3, also available on OrcaRouter.

Embed this badge

OpenAI: GPT-4$30.00/M in14568ms p50via OrcaRouter
HTML <a href="https://www.orcarouter.ai/models/openai/gpt-4" target="_blank"> <img src="https://www.orcarouter.ai/embed/openai/gpt-4.svg" alt="OpenAI: GPT-4 on OrcaRouter" /> </a>
Markdown [![OpenAI: GPT-4](https://www.orcarouter.ai/embed/openai/gpt-4.svg)](https://www.orcarouter.ai/models/openai/gpt-4)

Model card as data

GET /api/public/models/openai/gpt-4Open
Machine-readable:/llms.txt/llms-full.txt