Use xAI web search with Grok 4.6

by xAIWeb search

Grok 4.6 has its own web search on 4 of its 5 routes, and auto uses it. On every other route and endpoint Opper's engine runs the search.

UsexAI web searchwithin

Add xAI web search to Grok 4.6

Set up with agents

Paste this into your coding agent (Claude Code, Cursor, Codex, and more) and it will set up and build with Opper for you.

Get your API key

In your code

curl https://api.opper.ai/v3/compat/chat/completions \
-H "Authorization: Bearer $OPPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "xai/grok-4.6",
"messages": [{"role": "user", "content": "What changed in the news today?"}],
"tools": [{"type": "opper:web_search"}]}'

Where you can run it

Grok 4.6 runs xAI web search on the routes below. Some routes also sell priority processing: the same model at another price, picked per request with service_tier. How service tiers work.

ProviderRegionZero data retentionTrainingInputOutputCache read
USNo$2.20$6.60$0.55Not offered on this route
USNo$2.20$6.60$0.55Not offered on this route
MultiNo$2.00$6.00$0.50
MultiNo$2.00$6.00$0.50

The model

by xAI

Grok 4.6 is xAI's August 2026 frontier release, tuned for long-running agents and coding with a 500K context window and vision input.

Available on

Pricing from$2.00/ 1M input$6.00/ 1M output$0.50/ 1M cache read500Kcontext

Privacy

ZDR
Training
No
Region
Multi, US

Use xAI web search with other models

Step-by-step setup for xAI web search on each of these models through Opper.

More tools on Opper

Use xAI web search with Grok 4.6

One key, 700+ models, a choice of region, and zero data retention. Tools run in the same request, with every call in your traces.

Get startedView Documentation