Speed
Output tokens / second
Custom pricing for production workloads
GPT-5 is OpenAI's most advanced language model with a 400K token context window and superior reasoning capabilities.
It delivers enhanced reasoning, deeper memory retention, and superior accuracy across diverse domains such as coding, scientific analysis, and large-scale document processing, with robust safety and bias mitigation systems.
openai/gpt-5-2025-08-07https://api.aimlapi.com/v1GPT-5 is OpenAI’s most capable large language model to date. Launched on August 7, 2025, it introduces a unified architecture that intelligently routes between a fast everyday model, a deeper “thinking” reasoning engine, and a real-time decision layer that knows exactly when to go deep.
With a massive 400,000-token context window, native vision support, and major leaps in instruction following, tool use, and factual accuracy. It crushes benchmarks in coding, math, scientific reasoning, and long-context analysis while staying fast and cost-effective for high-volume workloads.
GPT-5 is built on an advanced transformer framework with optimized attention mechanisms and energy-efficient Mixture of Experts (MoE) layers. Recursive training and enhanced context management enable dynamic focus on salient information, improving both computational speed and accuracy over prior generation models.
GPT-5 automatically decides when to use “thinking” mode for hard problems. Need step-by-step logic on a tricky algorithm? It goes deep. Need a fast answer? It stays snappy. You can also explicitly control reasoning effort (minimal → high) for predictable behavior and cost.
Process entire codebases, 200-page PDFs, hours of meeting transcripts, or long customer histories in a single prompt. No more chunking, summarizing, or losing the plot halfway through.
See how GPT-5 compares in generation speed. Data retrieved Nov 3, 2026.
Output tokens / second
Compare 17 models available on AI/ML API across 5 independent benchmarks.
Expert-written questions across academic subjects.
Graduate-level science questions written to resist web search.
Reasoning across long documents of about 100k tokens.
Following precise instructions about the shape of the answer.
Customer support agent tasks with tool calls.
| Usage | Price | Unit |
|---|---|---|
| Input | $1.25 | 1M tokens |
| Output | $10 | 1M tokens |
| Cached input | $0.125 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $1.25 | $10 | |
| $0.1 | $0.5 | |
| $1 | $5 | |
| $2 | $10 | |
| $2.12 | $10.58 |
Give your agent the model details, code and documentation.
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "openai/gpt-5-2025-08-07",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "openai/gpt-5-2025-08-07",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "openai/gpt-5-2025-08-07",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());GPT-5 has a 400,000 tokens context window and can return up to 128,000 tokens.
GPT-5 takes image, text as input and returns text.
Use openai/gpt-5-2025-08-07 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
GPT-5 costs $1.25 input and $10 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Yes, GPT-5 can stream responses as they are generated.
Yes, GPT-5 accepts image input alongside text.
GPT-5 was built by OpenAI.