81trust / 100
Llm Context
by Brave Search in Search & web
x402 APIPassing, checked 5 h ago
Web search that returns page text ready for an LLM prompt. Picks the passages most relevant to q from the top results and groups them by source URL. Use it to ground an answer in current web content without fetching pages. Size the context with maximum_number_of_tokens and maximum_number_of_urls.
GET https://search.agent.s.brave.app/res/v1/llm/context
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 191 ms typical, 191 ms slowest 5%
- Last check
- 5 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X GET "https://search.agent.s.brave.app/res/v1/llm/context?maximum_number_of_tokens=2048&q=brave+browser"import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fsearch.agent.s.brave.app%2Fres%2Fv1%2Fllm%2Fcontext
const res = await pay("https://search.agent.s.brave.app/res/v1/llm/context?maximum_number_of_tokens=2048&q=brave+browser");
console.log(await res.json());Example input
{
"maximum_number_of_tokens": 2048,
"q": "brave browser"
}Example output
{
"grounding": {
"generic": [
{
"snippets": [
"The Brave browser is a fast, private and secure web browser for PC, Mac and mobile."
],
"title": "The browser that puts you first | Brave",
"url": "https://brave.com/"
}
]
},
"sources": {
"https://brave.com/": {
"hostname": "brave.com",
"title": "The browser that puts you first | Brave"
}
}
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 5 h ago | Passed | 402 | 191 ms | $0.005 |