# NanoAPI - Pay-per-use APIs for AI Agents > Image processing and Solana data APIs for AI agents, built on the x402 protocol. > Pricing: $0.001-$0.01 USDC per call. Accepts payments on Base (EVM) or Solana. > No accounts, no API keys required. ## What this is NanoAPI provides pay-per-call APIs designed for AI agents and autonomous workflows: - **Image processing** (resize, compress, convert) at $0.01 USDC per call - **Solana data** (transaction parser, priority-fee oracle) at $0.001-$0.002 USDC per call Each call is paid via the x402 HTTP payment protocol. Settles in ~1-2 seconds. No subscription, no minimum, pay-per-use. ## Base URL https://nanoapi.org ## Payment All paid endpoints return HTTP 402 Payment Required on first call. Agents can pay on either network — pick whichever matches your wallet: - Base (EVM): network `eip155:8453`, USDC, receive wallet `0xc9D8b70e8d66838Aed62919ACeE5cF3364d54f7D` - Solana (SVM): network `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`, USDC, receive wallet `EDA777JRvxbahjFS5x2wmXFR4VZiwTGU7dFA24Zpgp8Q` Facilitators used (gas-sponsored settlement): - EVM: https://facilitator.xpay.sh - SVM: https://facilitator.payai.network Machine-readable discovery: https://nanoapi.org/openapi.json (primary) and https://nanoapi.org/.well-known/x402 (fallback). ## Image Endpoints (multipart/form-data, $0.01 each) ### POST /image/resize — Resize images to target dimensions Fields: image (file), width (1-4096), height (1-4096). Returns PNG. Use cases: thumbnails, social media optimization, responsive web images, bandwidth reduction. ### POST /image/compress — Compress images to reduce file size Fields: image (file), quality (1-100). Returns JPEG. Use cases: reducing storage, optimizing web delivery, preparing uploads. ### POST /image/convert — Convert between image formats Fields: image (file), format ("png"|"jpg"|"webp"|"avif"). Returns image in requested format. Use cases: web optimization (WebP/AVIF), legacy compatibility (PNG/JPEG). ## Solana Data Endpoints (application/json) ### POST /sol/tx/parse — Parse a Solana transaction ($0.002) Body: { "signature": "" } Returns: JSON with type (SWAP/TRANSFER/MINT/etc), description, tokenTransfers, nativeTransfers, fee, feePayer, programsInvolved, and a classified flag. Supports Jupiter, Raydium, Meteora (DLMM/DAMM), Pump.fun, Orca, Phoenix, Metaplex, Magic Eden, Tensor, SPL token transfers, and 100+ other programs. Use cases: understand what a transaction did, audit wallet activity, explain a swap to a user, classify on-chain events, detect suspicious behavior. ### POST /sol/fees/recommend — Recommended Solana priority fee ($0.001) Body: { "accounts": [""] (optional), "priority": "low"|"medium"|"high"|"veryHigh" (optional), "computeUnits": 1000-1400000 (optional, default 200000) } Returns: microLamportsPerCU + priority/total fees in lamports and SOL. If `priority` is omitted, a `levels` object with all four levels is included. Use cases: estimate priority fee before submitting a Solana tx, avoid overpaying during calm periods, avoid being dropped during congestion. ## Free Endpoints ### GET /health — Free health check Returns JSON with service status, version, networks, and uptime. ### GET /openapi.json — Free OpenAPI 3.1 spec Full machine-readable spec with x-payment-info and x-guidance for agent semantic search. ### GET /.well-known/x402 — Free x402 discovery (v1) Simple URL list for fallback discovery. ## Example ``` POST /sol/tx/parse Content-Type: application/json {"signature":"2uVd1cYKv..."} ``` First response: 402 Payment Required with PAYMENT-REQUIRED header (contains both Base and Solana payment options). After payment: 200 OK with parsed transaction data and PAYMENT-RESPONSE header. ## Links - Discovery (primary): https://nanoapi.org/openapi.json - Discovery (fallback v1): https://nanoapi.org/.well-known/x402 - Health: https://nanoapi.org/health - x402 protocol: https://www.x402.org