Three ways to connect
Local MCP for IDE agents, REST API with x402 dual-rail micropayments (Base + X Layer), or ACP marketplace for agent-to-agent commerce.
Auto-detects your Twitter session from the browser. Encrypts credentials into a self-contained stateless token locally — nothing is sent to the server.
Default: auto-generated wallet at ~/.config/xbird/wallet.json — send ~$0.01 USDC on Base. Optional: OKX Agentic Wallet (onchainos) for Base USDC or X Layer USDT — set XBIRD_PAYMENT_MODE=agentic.
Use @x402/fetch with your xbird_sk_ token in the X-Encryption-Key header. The server decrypts per-request, stores nothing.
Pass Twitter cookies directly as request headers. Best for quick testing and one-off calls.
headers: {"X-Twitter-Auth-Token": "<auth_token>","X-Twitter-CT0": "<ct0>"}
Run xbird login once. Credentials are AES-256-GCM encrypted into a self-contained token. Server stores nothing — fully stateless.
// Generate (once, local)$ npx @checkra1n/xbird login// Use (every request)headers: { "X-Encryption-Key": "<token>" }// token = xbird_sk_<key>.<ciphertext>.<iv>
/api/search?q=...&count=20$0.05/api/search?q=...&count=20GET$0.05Search tweets (post_read × count)/api/tweet/:id$0.0025/api/tweet/:idGET$0.0025Get tweet by ID (1 unit)/api/user/:handle$0.005/api/user/:handleGET$0.005Get user profile/api/user/:id/tweets?count=20$0.10/api/user/:id/tweets?count=20GET$0.10User tweets (user_read × count)/api/tweet$0.0075/api/tweetPOST$0.0075Post a new tweet/api/tweet/:id/reply$0.0075/api/tweet/:id/replyPOST$0.0075Reply to a tweet/api/tweet/:id/like$0.0075/api/tweet/:id/likePOST$0.0075Like a tweet/api/tweet/:id/retweet$0.0075/api/tweet/:id/retweetPOST$0.0075Retweet/api/media/upload$0.005/api/media/uploadPOST$0.005Upload mediaimport { wrapFetchWithPayment, x402Client } from "@x402/fetch";import { registerExactEvmScheme } from "@x402/evm/exact/client";import { privateKeyToAccount } from "viem/accounts";// 1. Setup x402 payment (wallet from ~/.config/xbird/wallet.json)const account = privateKeyToAccount("0x...");const client = new x402Client();registerExactEvmScheme(client, { signer: account });const payFetch = wrapFetchWithPayment(fetch, client);// 2. Use stateless token from `xbird login`const res = await payFetch("https://xbirdapi.up.railway.app/api/search?q=AI+agents&count=20",{headers: {// Self-contained token: xbird_sk_<key>.<ciphertext>.<iv>"X-Encryption-Key": process.env.XBIRD_TOKEN,},});const { data, cursor } = await res.json();