Grok-4 chat completions augmented with live web search, paid per call via Locus MPP on Tempo L2.
What it does
This endpoint provides chat completions powered by xAI's Grok-4 family models with integrated web search capabilities. When you send a conversation to `/grok/web-search`, the model can query the live web to ground its responses in current information. You can constrain searches to specific domains (up to 5 allowed or 5 excluded) via the `search_parameters` field. Supported models include `grok-4-0709`, `grok-4-1-fast-reasoning`, and `grok-4-1-fast-non-reasoning`.
Payment is handled through the Locus Micropayment Protocol (MPP) settling on Tempo L2 in pathUSD. Pricing is dynamic, estimated at roughly $0.01–$0.50 per request depending on model choice and token usage. The request schema follows an OpenAI-compatible chat completions format with `model`, `messages`, optional `temperature` (0.0–2.0), and `max_tokens` parameters.
This endpoint is part of a broader Grok service suite hosted at `grok.mpp.paywithlocus.com` that also offers plain chat completions, X/Twitter search, code execution, image generation/editing, and text-to-speech — each at its own path. Documentation is available at https://docs.x.ai for the underlying xAI API and https://beta.paywithlocus.com/mpp/grok.md for the MPP-specific integration.
Capabilities
Use cases
- —Answering questions that require up-to-date web information
- —Research tasks where the LLM needs to cite current sources
- —Building agents that combine reasoning with live web lookups
- —Fact-checking or verifying claims against current web content
- —Generating summaries of recent events or news
Fit
Best for
- —AI agents needing grounded, web-current answers from Grok-4 models
- —Developers who want pay-per-call access without API key management
- —Applications requiring domain-scoped web search within LLM responses
Not for
- —High-volume batch processing where dynamic pricing may be unpredictable
- —Use cases requiring non-Grok-4 models (web search requires Grok-4 family)
- —Offline or latency-critical applications where web search adds delay
Quick start
curl -X POST https://grok.mpp.paywithlocus.com/grok/web-search \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4-0709",
"messages": [
{"role": "user", "content": "What are the latest developments in fusion energy?"}
],
"max_tokens": 1024
}'Example
Request
{
"model": "grok-4-0709",
"messages": [
{
"role": "user",
"content": "What is the current price of Bitcoin?"
}
],
"max_tokens": 512,
"temperature": 0.7,
"search_parameters": {
"allowed_domains": [
"coinmarketcap.com",
"coingecko.com"
]
}
}Endpoint
Quality
The OpenAPI spec provides a clear schema, model list, pricing guidance, and documentation links. However, the probe did not capture a live 402 challenge on HEAD/GET (the endpoint is POST-only, so 404 on HEAD/GET is expected), no example response is available, and all crawled pages returned 404 with no additional documentation content. Pricing is described as dynamic with a wide range.
Warnings
- —Probe returned 404 on HEAD and GET — endpoint is POST-only; liveness via MPP 402 challenge was not confirmed
- —Pricing is described as 'Dynamic (~$0.01–$0.50)' with no fixed amount; actual cost per call may vary significantly
- —No example response schema is provided in the OpenAPI spec
- —search_parameters is typed as string in the schema but described as an object with allowed_domains/excluded_domains — possible schema inaccuracy
Citations
- —Web search endpoint requires Grok-4 family models (grok-4-0709, grok-4-1-fast-reasoning, grok-4-1-fast-non-reasoning)https://grok.mpp.paywithlocus.com
- —Pricing is dynamic, approximately $0.01–$0.50 per requesthttps://grok.mpp.paywithlocus.com
- —Payment settles via Tempo L2 (method: tempo) with intent: chargehttps://grok.mpp.paywithlocus.com
- —search_parameters supports allowed_domains and excluded_domains (max 5 each)https://grok.mpp.paywithlocus.com
- —API reference documentation available at docs.x.aihttps://docs.x.ai
- —MPP-specific docs at beta.paywithlocus.com/mpp/grok.mdhttps://beta.paywithlocus.com/mpp/grok.md