GPT-4 API Pricing
As of October 10, 2026, GPT-4 costs $30.00 per 1M input tokens and $60.00 per 1M output tokens on OpenAI. It has an 8,192-token context window and returns up to 4,096 tokens per response.
gpt-4.- Input
- $30.00 / 1M tokens
- Output
- $60.00 / 1M tokens
- Context window
- 8,192 tokens
- Max output
- 4,096 tokens
- Providers
- 3
GPT-4 pricing by provider
7 listings across 3 providers. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.
| Provider | Model name in LiteLLM | Input | Output | Batch in | Batch out | Context |
|---|---|---|---|---|---|---|
| OpenAI | gpt-4 | $30.00 | $60.00 | – | – | 8K |
| OpenAIsnapshot 0613 | gpt-4-0613 | $30.00 | $60.00 | $15.00 | $30.00 | 8K |
| OpenAIfine-tuned, snapshot 0613 | ft:gpt-4-0613 | $30.00 | $60.00 | – | – | 8K |
| Azure OpenAI | azure/gpt-4 | $30.00 | $60.00 | – | – | 8K |
| Azure OpenAIsnapshot 0613 | azure/gpt-4-0613 | $30.00 | $60.00 | – | – | 8K |
| GitHub Copilot | github_copilot/gpt-4 | – | – | – | – | 32K |
| GitHub Copilotsnapshot 0613 | github_copilot/gpt-4-0613 | – | – | – | – | 32K |
What GPT-4 costs in practice
1,000 requests with 2,000 input and 500 output tokens each
| OpenAI | $90.00 |
| Azure OpenAI | $90.00 |
GPT-4 features
- Function calling
- Prompt caching
Use GPT-4 with LiteLLM
Call GPT-4 through the LiteLLM Python SDK, or put it behind the LiteLLM proxy and send OpenAI-format requests to /v1/chat/completions. LiteLLM tracks the cost of every request at these prices.
from litellm import completion
response = completion(
model="gpt-4",
messages=[{"role": "user", "content": "Hello!"}],
)model_list:
- model_name: gpt-4
litellm_params:
model: gpt-4
api_key: os.environ/OPENAI_API_KEYcurl http://0.0.0.0:4000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-1234" \
-d '{
"model": "gpt-4",
"messages": [{"role": "user", "content": "Hello!"}]
}'GPT-4 FAQ
How much does GPT-4 cost?
GPT-4 costs $30.00 per 1M input tokens and $60.00 per 1M output tokens on OpenAI.
What is the context window of GPT-4?
GPT-4 has an 8,192-token context window and returns up to 4,096 tokens per response.
Which providers offer GPT-4?
GPT-4 is available from 3 providers through LiteLLM: OpenAI, Azure OpenAI and GitHub Copilot.
How do I call GPT-4 with an OpenAI-compatible API?
Use the LiteLLM Python SDK with model="gpt-4", or add the model to the LiteLLM proxy's config.yaml and send requests to /v1/chat/completions from any OpenAI client. LiteLLM tracks the cost of every request at the prices on this page.
What features does GPT-4 support?
GPT-4 supports function calling and prompt caching.
Is GPT-4 being deprecated?
OpenAI lists a deprecation date of October 23, 2026 for gpt-4.
Sources
Prices come from LiteLLM's open-source model_prices_and_context_window.json, which LiteLLM uses to calculate the cost of every request. Provider pricing pages:
- developers.openai.com/api/docs/pricing
- learn.microsoft.com/en-us/azure/foundry/openai/concepts/retired-models
- learn.microsoft.com/en-us/azure/foundry/openai/concepts/legacy-models
LiteLLM docs: OpenAI, Azure OpenAI, GitHub Copilot.
Provider pages: OpenAI, Azure OpenAI, GitHub Copilot.
