XonaXona Docs
OverviewResourcesxPayInference

SDK

Typed programmatic access to xPay — discovery, x402 payments, transfers, and reports.

The CLI is a thin shell over the SDK — every command has a programmatic equivalent. One entry point, fully typed.

import { createXPay, loadProfile } from "@xona-labs/xpay";

const xpay = createXPay({
  profile: await loadProfile({ passphrase }),
});

// pay any x402 endpoint, get the result
const video = await xpay.useByUrl(
  "https://api.xona-agent.com/video/short-generation",
  { body: { prompt: "a cat astronaut" } }
);

Other surface you'll use often:

await xpay.discover({ query: "weather" });
await xpay.do("translate this PDF to Japanese");
await xpay.transfer({ amount: 1, to, token: "USDC" });
await xpay.report({ period: "weekly" }); // daily | weekly | monthly
await xpay.wallet.balance("solana");

Agent runtimes get first-class tool definitions: forClaude(xpay), forOpenAI(xpay), and forGemini(xpay) — same handlers, vendor-shaped schemas.