OpenAI requires bringing your own API key to use GPT-5 over the API. Set up here: https://openrouter.ai/settings/integrations

OpenAI: GPT-5

openai/gpt-5

Created Aug 7, 2025400,000 context
$1.25/M input tokens$10/M output tokens

GPT-5 is OpenAI’s most advanced model, offering major improvements in reasoning, code quality, and user experience. It is optimized for complex tasks that require step-by-step reasoning, instruction following, and accuracy in high-stakes use cases. It supports test-time routing features and advanced prompt understanding, including user-specified intent like "think hard about this." Improvements include reductions in hallucination, sycophancy, and better performance in coding, writing, and health-related tasks.

Note that BYOK is required for this model. Set up here: https://openrouter.ai/settings/integrations

Providers for GPT-5

OpenRouter routes requests to the best providers that are able to handle your prompt size and parameters, with fallbacks to maximize uptime.

Latency
1.57s
Throughput
50.45tps
Uptime
100.0%
Uptime 100.0 percent
Total Context
Max Output
Input Price
Output Price
Cache Read
Cache Write
400K
128K
$1.25
$10
$0.125
--

Throughput

Latency

Apps using GPT-5

Top public apps this week using this model

1.
Favicon for https://kilocode.ai/
Kilo Code
AI coding agent for VS Code
27.8Btokens
2.
Favicon for https://cline.bot/
Cline
Autonomous coding agent right in your IDE
8.83Btokens
3.
Favicon for https://roocode.com/
Roo Code
A whole dev team of AI agents in your editor
4.57Btokens
4.
Favicon for https://openrouter.ai/chat
OpenRouter: Chatroom
Chat with multiple LLMs at once
1.61Btokens
5.
Favicon for https://litellm.ai/
liteLLM
Open-source library to simplify LLM calls
464Mtokens
6.
Favicon for https://bothub.chat/
BotHub
Multi-model ChatGPT
400Mtokens
7.
Favicon for https://onlook.com/
320Mtokens
8.
Favicon for https://opencode.ai/
OpenCode
AI coding agent built for the terminal
207Mtokens
9.
Favicon for https://agent-zero.ai/
194Mtokens
10.
Favicon for https://zed.dev/
180Mtokens
11.
Favicon for https://aider.chat/
Aider
AI pair programming in your terminal
153Mtokens
12.
Favicon for https://codebuff.com/
143Mtokens
14.
Favicon for https://openwebui.com/
Open WebUI
Extensible, self-hosted AI interface
89.6Mtokens
15.
Favicon for https://magai.co/
Magai
The best AI models in one gorgeous interface
89.4Mtokens
17.
Favicon for https://maximoai.co/
66.4Mtokens
18.
Favicon for https://kortex.co/
62.6Mtokens
19.
Favicon for https://forgecode.dev/
forge
Lightweight AI assistant for the terminal
61.2Mtokens
20.
Favicon for https://hoody.com/
56.9Mtokens

Recent activity on GPT-5

Tokens processed per day

Aug 6Aug 10Aug 143B6B9B12B

Uptime stats for GPT-5

Uptime stats for GPT-5 on the only provider

When an error occurs in an upstream provider, we can recover by routing to another healthy provider, if your request filters allow it.

Learn more about our load balancing and customization options.

Sample code and API for GPT-5

OpenRouter normalizes requests and responses across providers for you.

OpenRouter provides an OpenAI-compatible completion API to 400+ models & providers that you can call directly, or using the OpenAI SDK. Additionally, some third-party SDKs are available.

In the examples below, the OpenRouter-specific headers are optional. Setting them allows your app to appear on the OpenRouter leaderboards.

from openai import OpenAI

client = OpenAI(
  base_url="https://openrouter.ai/api/v1",
  api_key="<OPENROUTER_API_KEY>",
)

completion = client.chat.completions.create(
  extra_headers={
    "HTTP-Referer": "<YOUR_SITE_URL>", # Optional. Site URL for rankings on openrouter.ai.
    "X-Title": "<YOUR_SITE_NAME>", # Optional. Site title for rankings on openrouter.ai.
  },
  extra_body={},
  model="openai/gpt-5",
  messages=[
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What is in this image?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
          }
        }
      ]
    }
  ]
)
print(completion.choices[0].message.content)

Using third-party SDKs

For information about using third-party SDKs and frameworks with OpenRouter, please see our frameworks documentation.

See the Request docs for all possible fields, and Parameters for explanations of specific sampling parameters.

More models from OpenAI

    GPT-5 - API, Providers, Stats | OpenRouter