Wire your Discord bot's slash commands to x711's /api/refuel. Each command becomes a one-line fetch.
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
// 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.
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.