# Grok 4.5

Grok 4.5 is SpaceXAI's reasoning model for coding, agentic tasks, and knowledge work. Grok 4.5 accepts text and images, and three reasoning levels let you set how long the model thinks before it answers.

- **Model ID:** `spacexai/grok-4.5`
- **Type:** chat
- **Providers:** xai
- **Context window:** 500,000
- **Maximum output tokens:** 500,000
- **Pricing:** $2/1M input tokens, $6/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/grok-4.5

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { streamText } from 'ai'

const result = streamText({
  model: 'spacexai/grok-4.5',
  prompt: 'Why is the sky blue?'
})
```

## About

Grok 4.5 was released July 8, 2026 as SpaceXAI's reasoning model for coding, agentic tasks, and knowledge work. Grok 4.5 accepts text and image input, returns text, and works within a context window of 500K tokens. SpaceXAI lists a knowledge cutoff of February 1, 2026.

Reasoning depth is a per-request setting. Grok 4.5 supports low, medium, and high levels and defaults to high. Use low for latency-sensitive agent steps and simple tool calls, medium for data analysis and long-context reasoning, and high for competition-level math, multi-step logic, and hard engineering problems. Reasoning can't be switched off.

Tool support covers function calling, structured outputs, web search, X search, and code execution, so an agent can look something up or run code before it answers. Long agent loops also benefit from context compaction, which trims earlier turns so a session keeps running past the raw window.

You can integrate Grok 4.5 through AI SDK, Chat Completions API, Responses API, Messages API, or other API formats, from TypeScript or Python. Routing rules move traffic from another Grok model to Grok 4.5 without changing application code.

## What to consider

Reasoning stays on for every Grok 4.5 request, so responses include thinking tokens even at the low level. Budget output tokens with that in mind and set the level per request instead of leaving everything at the default high.

SpaceXAI bills prompts at or above 200K tokens at a higher rate, and that rate applies to every token in the request rather than only the tokens past the threshold. Check the pricing panel on this page before you send very long prompts. The knowledge cutoff of February 1, 2026 also means Grok 4.5 needs web search or retrieval for anything more recent.

## When to use

### Best For

- **Agentic coding tasks** that run multi-step software engineering with function calling and code execution
- **Adjustable reasoning depth** across low, medium, and high levels tuned per request
- **Technical knowledge work** on science, engineering, and math problems that reward deeper thinking
- **Vision-assisted development** that pairs screenshots, diagrams, and design references with text prompts
- **Search-backed answers** using web search and X search to cover ground past the knowledge cutoff

### Consider Alternatives When

- **Reasoning-free responses** are enough, where Grok 4.1 Fast Non-Reasoning answers without spending thinking tokens
- **High-volume simple calls** dominate, where Grok 3 Mini Fast costs less per token on straightforward tasks
- **Fast code generation** covers the workload, where Grok Code Fast 1 is tuned for quick code edits at lower cost
- **Multi-agent orchestration** fits the problem, where Grok 4.20 Multi-Agent spreads one request across collaborating agents

## Best for

- **Agentic Coding Tasks:** Multi-step software engineering with function calling and code execution
- **Adjustable Reasoning Depth:** Low, medium, and high levels tuned per request
- **Technical Knowledge Work:** Science, engineering, and math problems that reward deeper thinking
- **Vision-Assisted Development:** Screenshots, diagrams, and design references alongside text prompts
- **Search-Backed Answers:** Web search and X search cover ground past the knowledge cutoff

## Consider alternatives

- **Reasoning-Free Responses:** Grok 4.1 Fast Non-Reasoning answers without spending thinking tokens
- **High-Volume Simple Calls:** Grok 3 Mini Fast costs less per token on straightforward tasks
- **Fast Code Generation:** Grok Code Fast 1 is tuned for quick code edits at lower cost
- **Multi-Agent Orchestration:** Grok 4.20 Multi-Agent spreads one request across collaborating agents

## Frequently asked questions

### What is Grok 4.5 built for?

Coding, agentic tasks, and knowledge work. SpaceXAI targets Grok 4.5 at real engineering problems across science, engineering, and math.

### How do I control reasoning depth on Grok 4.5?

Set the reasoning level to low, medium, or high on each request. Grok 4.5 defaults to high, and reasoning can't be disabled. Low suits latency-sensitive agent steps and simple tool calls, medium suits data analysis and long-context reasoning, and high suits multi-step logic and competition-level math.

### Does Grok 4.5 accept image input?

Yes. Grok 4.5 accepts text and image input and returns text. Use a dedicated image model when you need generated images as output.

### What is the context window for Grok 4.5?

The context window is 500K tokens, with up to 500K tokens per response.

### What is the knowledge cutoff for Grok 4.5?

February 1, 2026. Pair Grok 4.5 with web search or retrieval for facts that changed after that date.

### What tools does Grok 4.5 support?

Function calling, structured outputs, web search, X search, and code execution. Long agent loops can also use context compaction to trim earlier turns and keep a session running.

### Can I move traffic to Grok 4.5 without changing my code?

Yes. Add an AI Gateway routing rule that rewrites requests from another Grok model to `spacexai/grok-4.5`. Your application keeps sending the old model identifier.

### How do I authenticate with Grok 4.5 through Vercel AI Gateway?

Use your Vercel AI Gateway API key with `spacexai/grok-4.5` as the model identifier. AI Gateway handles provider routing automatically.

### What does Grok 4.5 cost?

See the pricing section on this page for today's rates. AI Gateway reflects each provider's pricing for Grok 4.5 with no markup.

### Does Vercel AI Gateway support Zero Data Retention for Grok 4.5?

Yes, Zero Data Retention is available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.

## Links

- [Model page](https://vercel.com/ai-gateway/models/grok-4.5)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://docs.x.ai/developers/models/grok-4.5)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
