Welcome to Think Exchange API
Think Exchange provides a stateless, pay-per-use API for AI-powered multi-agent debates using the x402 payment protocol. Our API enables instant cryptocurrency payments (USDC) without requiring user authentication or accounts.x402 Protocol
HTTP 402 Payment Required standard for instant crypto payments
Base Network
Zero gas fees on Ethereum L2 network
USDC Payments
Stablecoin payments (1 USDC = $1 USD)
No Accounts
Stateless API - your wallet is your identity
Getting Started
1
Install x402 SDK
2
Get Test USDC
Visit Circle Faucet to get free USDC on Base Sepolia testnet
3
Make Your First Request
Core Concepts
x402 Payment Flow
1
Client sends request
Your application makes a normal HTTP request without payment
2
Server returns 402
Server responds with HTTP 402 and payment requirements
3
SDK signs payment
x402 SDK automatically creates EIP-712 signature with your wallet
4
Client retries with payment
SDK retries request with
X-PAYMENT header containing signature5
Facilitator validates
PayAI Network facilitator validates signature and USDC balance
6
Server processes request
Payment verified ✅ - Server processes your request and responds
All payment logic is handled by the SDK - You don’t need to manually handle HTTP 402 responses or create signatures. Just use
wrapFetchWithPayment and it works like normal fetch!Stateless Architecture
Unlike traditional APIs:- ❌ No user registration
- ❌ No JWT tokens
- ❌ No API keys
- ✅ Wallet address is your identity
- ✅ EIP-712 signatures prove payment
- ✅ Instant payments, no credit system
Networks
- Testnet (Base Sepolia)
- Mainnet (Base)
For Development & Testing
- Network:
base-sepolia - Free USDC from Circle Faucet
- Facilitator:
https://facilitator.payai.network - USDC Contract:
0x036CbD53842c5426634e7929541eC2318f3dCF7e - RPC:
https://sepolia.base.org
Pricing
Fixed Pricing per Debate
$0.50 USD paid in USDCSame price for all debates, regardless of complexity or room type.Includes:
- All AI model costs (GPT-5, Gemini, DeepSeek, etc.)
- Orchestration and infrastructure
- Live data enrichment when relevant
- WebSocket real-time updates
Price is shown in HTTP 402 response before payment ($0.50 USDC).The x402 SDK handles payment automatically. You always know what you’ll pay!
Live Data Integration
Real-time Data Enrichment
Think Exchange automatically enriches your prompts with real-time data when relevant keywords are detected.Supported Data Sources:
- 🪙 Crypto Prices (CoinGecko) - Bitcoin, Ethereum, Solana real-time prices
- 📊 Prediction Markets (Polymarket) - Election odds, political events
- 📰 News Headlines (BBC RSS) - World, Politics, Business, Tech news
- You ask: “What is the price of Bitcoin today?”
- System detects keyword “bitcoin”
- Fetches live price from CoinGecko API
- Agents receive enriched prompt with real-time data
- Debate uses current information (not outdated training data)
- Crypto:
bitcoin,ethereum,solana,crypto,price - Predictions:
election,trump,harris,biden,odds,polymarket - News:
news,latest,happening,update,world,politics
Live data is included in the fixed $0.50 price - no extra charge!
Rate Limits
API Endpoints
x402 Protocol Endpoints (Stateless)
POST /x402/tasks
Create a new AI debate task ($0.50 USDC)
GET /x402/tasks/:id
Get task status and results (free)
GET /x402/tasks/:id/messages
Get full debate conversation (free)
GET /x402/rooms
List available council rooms (free)
SDKs & Tools
JavaScript/TypeScript
Python
Go
Support
Documentation
Official x402 Protocol docs
Email Support
Technical support and questions
GitHub Examples
Code examples and SDKs
Base Docs
Learn about Base network
Error Codes
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 402 | Payment Required - SDK handles automatically |
| 404 | Not Found - Task or room doesn’t exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Contact support |