Xona Agent API
Xona is a creative AI agent that provides image generation, video generation, token intelligence, and social AI services. All resources are pay-per-use via the x402 protocol — no API keys, no subscriptions. You can also connect via MCP for agent-to-agent interaction.
Base URL
https://api.xona-agent.comMCP Server
Connect any MCP-compatible client (Claude, Cursor, or your own agent) to Xona. The server exposes 1 tools via Streamable HTTP transport.
MCP Endpoint
https://api.xona-agent.com/mcpConfiguration
{
"mcpServers": {
"xona-agent": {
"url": "https://api.xona-agent.com/mcp"
}
}
}Available Tools
ERC-8004
Xona is registered on the ERC-8004 Trustless Agents Identity Registry on Base for on-chain discovery and reputation.
x402 Payment
All Xona resources are pay-per-use via the x402 protocol. No API keys or subscriptions needed — you pay in USDC on Solana for each request.
How it works
- Send a request to any resource endpoint (e.g.
POST /image/designer). - The server responds with
402 Payment Requiredand includes the payment details — amount, asset (USDC), and the payTo address. - Sign the payment with your Solana wallet using the provided payment requirements.
- Resend the request with the signed
Payment-Signatureheader. - The payment settles atomically and you receive the result in the response body.
Client-side (Browser / Frontend)
Use @dexterai/x402 to handle the 402 flow automatically from the browser with a connected wallet.
npm install @dexterai/x402import { wrapFetch } from "@dexterai/x402/client";
const x402Fetch = wrapFetch(fetch, {
walletPrivateKey: "<solana-wallet-private-key>",
});
// Hit any Xona resource — payment is handled automatically
const response = await x402Fetch("https://api.xona-agent.com/image/designer", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
prompt: "A cyberpunk cityscape at sunset",
style: ["neon", "cinematic"],
aspect_ratio: "16:9",
}),
});
const { image_url, image_description, metadata } = await response.json();Server-side (Node.js / Backend)
Same approach works server-side. Store your wallet key securely and wrap your fetch calls.
import { wrapFetch } from "@dexterai/x402/client";
const x402Fetch = wrapFetch(fetch, {
walletPrivateKey: process.env.SOLANA_PRIVATE_KEY,
});
// Get trending tokens — $0.10 USDC per request
const res = await x402Fetch("https://api.xona-agent.com/token/pumpfun-trending");
const { summary, suggestions, trending_tokens } = await res.json();
// Generate a token starter kit — $0.20 USDC per request
const kit = await x402Fetch("https://api.xona-agent.com/token/starter-kit", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
prompt: "A meme coin about a cat astronaut called $ASTROCAT",
}),
});
const { logo_url, banner_url, token_name, token_ticker } = await kit.json();Manual flow (cURL)
You can also handle x402 manually. First, hit the endpoint to get the payment requirements, then sign and resend.
# Step 1: Get payment requirements
curl -s "https://api.xona-agent.com/image/designer" \
-X POST \
-H "Content-Type: application/json" \
-d '{"prompt": "sunset over mountains"}'
# → Returns 402 with payment requirements in the response body
# Step 2: Sign the payment with your wallet (using your x402 SDK)
# Step 3: Resend with the signed payment header
curl -X POST "https://api.xona-agent.com/image/designer" \
-H "Content-Type: application/json" \
-H "Payment-Signature: <your-signed-payment>" \
-d '{"prompt": "sunset over mountains"}'
# → Returns 200 with { image_url, image_description, metadata }Discovery
To list all available resources with pricing and schemas programmatically:
# List all x402 resources (public, no payment required)
curl https://api.xona-agent.com/x402-resources
# x402 discovery document
curl https://api.xona-agent.com/.well-known/x402Xona Agent · Powered by x402 · MCP · ERC-8004