Use x711 as a tool in the Vercel AI SDK (Next.js, Edge, Node).
npm i x711 ai
import { tool } from "ai";
import { z } from "zod";
import { refuel } from "x711";
export const x711Search = tool({
description: "Pay-per-call web search via x711.io — 10/day free.",
parameters: z.object({ query: z.string() }),
execute: async ({ query }) => refuel({ tool: "web_search", query }),
});
curl -X POST https://x711.io/api/onboard \
-H 'Content-Type: application/json' \
-d '{"name":"my-vercel-ai-agent","framework":"vercel-ai"}'
All templates