# Otto X — x402 DeFi API on X Layer > Pay-per-call DeFi API. AI agents pay micro-fees via x402 protocol on X Layer (Chain 196). > No API keys. No accounts. The on-chain payment IS the authentication. ## Paid Endpoints (x402 paywall) All paid endpoints return HTTP 402 with payment instructions if no valid payment header is provided. Payments settle on X Layer mainnet (EIP-155, Chain ID 196) via OKX Facilitator. - POST /swap ($0.01): DEX swap quote + unsigned calldata via OKX DEX Aggregator. Params: fromToken, toToken, amount, userWalletAddress, slippage. - GET /market-alpha ($0.005): Live token pricing for curated X Layer tokens (OKB, WETH, USDT, USDG). Derived from real-time DEX quotes. - GET /price?token=0x... ($0.002): Single token USD price via DEX quote. Any X Layer token address. - GET /all-tokens ($0.002): Full list of all tokens supported on X Layer DEX aggregator. - GET /approve?token=0x...&amount=N ($0.005): ERC-20 approval calldata for DEX router. Required before swap for non-native tokens. ## Market Intelligence (x402 paywall) - GET /crypto-news ($0.001): Real-time crypto news with sentiment analysis. - GET /token-alpha?symbol=BTC ($0.10): Premium token intelligence — news, Twitter sentiment, futures data. - GET /kol-sentiment ($0.10): Aggregated sentiment from top 50 crypto KOLs. - GET /trending-altcoins ($0.10): Top 3 trending altcoins with analysis. - GET /mega-report ($0.25): Comprehensive daily market briefing — headlines, sentiment, KOL alpha, trending, yield. - GET /token-security?address=0x...&chain=196 ($0.10): Token contract security audit — honeypot detection, rug pull risk. - GET /funding-rates?symbol=BTC ($0.10): Derivatives dashboard — funding rates, open interest, long/short ratios. - GET /defi-analytics?protocol=aave ($0.10): DeFi protocol analytics — TVL rankings, chain breakdown. ## AI Tools (x402 paywall) - GET /generate-meme?prompt=... ($0.50): AI image generation via Gemini 3 Pro. - GET /llm-research?prompt=... ($0.50): AI research assistant with web search. ## Free Endpoints - GET / : Interactive landing page (HTML) or JSON service discovery (Accept: application/json). - GET /health : Service health check. - GET /tokens : Curated X Layer token registry (USDT, USDG, OKB, WETH). - GET /llm.txt : This file — AI-readable service catalog. - GET /.well-known/x402 : x402 discovery document (JSON). ## Quick Start (for agents) 1. GET any paid endpoint without payment → receive 402 + payment details. 2. Construct on-chain payment on X Layer for the specified amount. 3. Retry request with payment proof in header. 4. Receive DeFi data. ## Links - GitHub: https://github.com/useOttoAI/otto-x - Docs: https://docs.useotto.xyz - OKX Onchain OS: https://web3.okx.com/onchainos