Search the web
Ask a question and get an answer from the current web with its source links, on your Flux key: from your agent, from your code, or inside a chat request.
Web search answers a question from the current web and returns the source links it used. It runs on the same Flux key as your chat requests and is billed to the same account. It is a paid ability.
| Part | Status |
|---|---|
Search, over the API (POST /v1/search) and in chat | Rolling out |
Search, from your agent (web_search) | Rolling out |
To read one page you already know, use Read a web page instead.
Two ways to search
- Standalone. Your agent calls the
web_searchtool, or your code sendsPOST /v1/searchwith aquery. You get back a written answer and its sources. Use this when you want the answer itself, or the links to read next. - Inside a chat request. Send a normal
POST /v1/chat/completionstoflux-auto,flux-fast,flux-standardorflux-reasoning, and Flux routes it to a model that can search when the request asks for it. Use this when search is one step in a conversation.
Search from your agent or your code
Add the Flux tools server once, and your agent gets a web_search tool that takes a query. From your own code, send the query to POST /v1/search.
Built into Murage, which decides which abilities it uses. Nothing to set up here. See murage.ai.
Built into Wayland, which decides which abilities it uses. Nothing to set up here. See getwayland.com.
Add the Flux tools server from your terminal.
claude mcp add --transport http flux-tools https://api.fluxrouter.ai/mcp-tools/ \
--header "Authorization: Bearer sk-YOUR-FLUX-KEY"
Then ask Claude Code:
Use the Flux web_search tool to find what changed in the latest Node.js LTS release, and list the sources.
From Claude Code's own docs, checked 2026-09-28.
Add the Flux tools server to the same config. Codex reads the key from FLUX_API_KEY, which you exported above. File: ~/.codex/config.toml
[mcp_servers.flux-tools]
url = "https://api.fluxrouter.ai/mcp-tools/"
bearer_token_env_var = "FLUX_API_KEY"
Then ask Codex:
Use the Flux web_search tool to find what changed in the latest Node.js LTS release, and list the sources.
From Codex's own docs, checked 2026-09-28.
Add the Flux tools server to your global MCP config, then restart Cursor. File: ~/.cursor/mcp.json
{
"mcpServers": {
"flux-tools": {
"url": "https://api.fluxrouter.ai/mcp-tools/",
"headers": {
"Authorization": "Bearer sk-YOUR-FLUX-KEY"
}
}
}
}
Then ask Cursor:
Use the Flux web_search tool to find what changed in the latest Node.js LTS release, and list the sources.
From Cursor's own docs, checked 2026-09-28.
Add the Flux tools server to the same config, then restart Hermes. File: ~/.hermes/config.yaml
mcp_servers:
flux-tools:
url: "https://api.fluxrouter.ai/mcp-tools/"
headers:
Authorization: "Bearer sk-YOUR-FLUX-KEY"
Then ask Hermes:
Use the Flux web_search tool to find what changed in the latest Node.js LTS release, and list the sources.
From Hermes's own docs, checked 2026-09-28.
Not checked yet. We have not checked how OpenClaw adds an MCP server, so we do not show a recipe. See OpenClaw's own docs.
Open Cline's MCP servers panel, edit the settings file, and add the Flux tools server.
{
"mcpServers": {
"flux-tools": {
"type": "streamableHttp",
"url": "https://api.fluxrouter.ai/mcp-tools/",
"headers": {
"Authorization": "Bearer sk-YOUR-FLUX-KEY"
}
}
}
}
Then ask Cline:
Use the Flux web_search tool to find what changed in the latest Node.js LTS release, and list the sources.
From Cline's own docs, checked 2026-09-28.
curl https://api.fluxrouter.ai/v1/search \
-H "Authorization: Bearer sk-YOUR-FLUX-KEY" \
-H "Content-Type: application/json" \
-d '{ "query": "What changed in the latest Node.js LTS release?" }'
import requests
resp = requests.post(
"https://api.fluxrouter.ai/v1/search",
headers={"Authorization": "Bearer sk-YOUR-FLUX-KEY"},
json={"query": "What changed in the latest Node.js LTS release?"},
)
resp.raise_for_status()
result = resp.json()
print(result["answer"])
for url in result["citations"]:
print("-", url)
print("Searches:", result["searches"], "Cost (USD):", result["cost_usd"])
const resp = await fetch('https://api.fluxrouter.ai/v1/search', {
method: 'POST',
headers: {
Authorization: 'Bearer sk-YOUR-FLUX-KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
query: 'What changed in the latest Node.js LTS release?',
}),
});
if (!resp.ok) throw new Error(await resp.text());
const result = await resp.json();
console.log(result.answer);
for (const url of result.citations) console.log('-', url);
console.log('Searches:', result.searches, 'Cost (USD):', result.cost_usd);
The response
{
"answer": "The latest LTS release ...",
"citations": ["https://nodejs.org/en/blog/release/..."],
"searches": 2,
"cost_microcents": 12345,
"cost_usd": "0.012345"
}
| Field | What it is |
|---|---|
answer | The written answer, in plain text. |
citations | The URLs the answer drew on, as a list of strings. It can be empty. |
searches | How many searches it took. One question can take more than one. |
cost_usd | What this call cost, as a string. cost_microcents is the same amount in millionths of a dollar. |
The numbers in the example are made up; your call returns its own. The response may carry other fields; ignore any you do not use. The full contract, with every error, is in the search reference.
Search does not stream. It either answers within 30 seconds or fails with a 502, and a failed search is not billed. A query can be up to 2,000 characters.
Search inside a chat request
On the four Flux tier models, a chat request is sent to a model that can search when either of these is true:
- It carries a web search tool, such as
"tools": [{ "type": "web_search" }]. - The last message clearly asks for a search, such as "search the web for the current Node.js LTS version". Asking a question that happens to be about recent events is not enough; say that you want a search.
curl https://api.fluxrouter.ai/v1/chat/completions \
-H "Authorization: Bearer $FLUX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-auto",
"tools": [{ "type": "web_search" }],
"messages": [
{ "role": "user", "content": "What is the current Node.js LTS version?" }
]
}'
The search cost is added to that request's bill, next to the tokens. A pinned model is served exactly as you asked, so this routing only happens on the tier models.
What it costs
Search is billed per search, plus the model tokens that write the answer: priced per call. One question can take more than one search, and searches in the response says how many ran. cost_usd is the settled amount, and it lands on the same bill as your other usage. See How billing works.
Free keys
Search is a paid ability.
- On the Free plan,
POST /v1/searchanswers402 premium_lockedand nothing is charged. - The
web_searchtool answerspremium_lockedwith an upgrade link, then drops out of your agent's tool list. - In chat, the search tool is removed from a Free key's request, so the model answers without searching.
Upgrade in Billing. See Plans.
Limits
Search shares one per-account rate limit with transcription and speech: 60 requests a minute across all three. Over it, calls answer 429; wait and retry. See Rate limits and retries.
If something goes wrong
Every search error, with its fix, is on Web search problems. To turn search results into a sourced summary, follow Research with sources.