Speed
Output tokens / second
Custom pricing for production workloads
xAI's large language model for text generation and advanced reasoning
Grok 4.5 is a chat and code model from xAI for text and file inputs, with reasoning, function calling and streaming for multi-step workflows.
x-ai/grok-4-5https://api.aimlapi.com/v1Grok 4.5 is documented as suited to coding, engineering, design, and professional workflows. It is also described as built for coding, agentic tasks, and knowledge work.
It is suited to everyday assistant use such as explaining unfamiliar topics, weighing big purchases, planning trips, and digging into topics of interest. The same source says it can also take tasks from start to finish, including building spreadsheets, turning outlines into slides and diagrams, drafting prose, and extracting key points from long PDFs.
It is suited to software engineering and office-document work, including building complex Excel models with web research and multi-sheet formulas, and creating PowerPoint and Word content. The model is also described as capable of using native PowerPoint shapes for diagrams and writing clear prose in Word.
It is suited to developer workflows that involve external tools and systems, with documentation stating it can connect to external tools and systems and return responses in specific, organized formats.
See how Grok 4.5 compares in generation speed and latency. Data retrieved Nov 3, 2026.
Output tokens / second
Compare 8 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.
Agentic tasks completed in a command-line environment.
Reasoning across long documents of about 100k tokens.
Python coding tasks drawn from scientific research.
| Usage | Price | Unit |
|---|---|---|
| Input | $2 | 1M tokens |
| Output | $6 | 1M tokens |
| Cached input | $0.3 | 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 |
|---|---|---|
| $2 | $6 | |
| $1 | $2 | |
| $1.25 | $2.5 | |
| $2 | $6 | |
| $2 | $6 |
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": "x-ai/grok-4-5",
"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": "x-ai/grok-4-5",
"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": "x-ai/grok-4-5",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Grok 4.5 has a 500,000 tokens context window.
Grok 4.5 takes text, file in as input and returns text out.
Use x-ai/grok-4-5 as the model id.
Grok 4.5 became available on July 8, 2026.
Grok 4.5 costs $2 input and $6 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Yes, Grok 4.5 can stream responses as they are generated.
Grok 4.5 was built by xAI .