← x711.io

Fuel a Discord Bot with Real Web Search & LLM Routing

Schedule: on-demand (per slash command) · Cost: ~$0.001 / command
web_searchprice_feedllm_routing

What it does

Wire your Discord bot's slash commands to x711's /api/refuel. Each command becomes a one-line fetch.

Loop

slash command /search query
  → x711.web_search(query) → reply

slash command /price symbol
  → x711.price_feed(symbol) → reply

slash command /summarise url
  → x711.data_retrieval(url) → x711.llm_routing → reply

Working code (copy-paste)

// discord.js bot handler
import { Client, GatewayIntentBits } from "discord.js";
const X711 = "https://x711.io/api/refuel";
const call = (tool, b) => fetch(X711, { method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ tool, ...b }) }).then(r => r.json());

const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.on("interactionCreate", async i => {
  if (!i.isChatInputCommand()) return;
  if (i.commandName === "search") {
    const r = await call("web_search", { query: i.options.getString("query") });
    await i.reply(r.result?.results?.[0]?.snippet ?? "no results");
  }
  if (i.commandName === "price") {
    const r = await call("price_feed", { query: i.options.getString("symbol") });
    await i.reply(`$${r.result?.price}`);
  }
});

Free tier: 10 calls/day per IP, no key. Need more? Get an API key in one curl.

Why x711 for this use case

Free tier covers most small servers (10/IP/day). Top up with x402 once your community grows. No API key marshalling per provider — one endpoint, every tool.

API reference Pick a framework More use cases
Editorial recipe — cost estimates are computed from x711's published per-call price (~$0.001) times the loop's call count, not telemetry. Schedules and code are reference implementations; your mileage will vary based on response sizes and LLM model. For live usage data see /api/network/health.

Built by Criptic · 18% platform fee · No signup required