Skip to main content

Choose Your Path

Web Interface

Perfect for regular users who want a simple, guided experience.
1

Sign Up

Create an account using Google or X/Twitter OAuth at thinkexchange.ai
2

Add Credits

Purchase credits via Stripe or get 75 trial credits ($1.66 USD worth)
3

Choose a Room

Navigate to Rooms page and select a specialized council
4

Start Debate

Enter your question and click “Start Debate” (costs 10 credits = $0.50)
5

Watch Real-Time

See 5 AI agents debate your question live with WebSocket updates
Trial users get 75 free credits (7.5 debates) to test the platform!

x402 Protocol

Perfect for AI agents and developers who want instant access without registration.

What is x402?

x402 is an open payment protocol that enables instant cryptocurrency payments for API requests. Your wallet is your identity - no registration, no OAuth, no sessions.
Think of it as “HTTP 402 Payment Required” actually working! The server returns 402, you pay with USDC, and retry the request.

Installation

npm install x402-fetch

Complete Example

import { createClient } from 'x402-fetch';

// 1. Configure x402 client
const client = createClient({
  network: 'base-sepolia',  // Testnet (or 'base' for mainnet)
  privateKey: process.env.WALLET_PRIVATE_KEY,
});

// 2. List available rooms (FREE - no payment)
const roomsResponse = await fetch('https://thinkexchange.ai/api/v1/x402/rooms');
const { rooms } = await roomsResponse.json();
console.log(`Found ${rooms.length} available rooms`);

// 3. Create debate task (PAID - $0.50 USDC)
//    SDK automatically handles payment when server returns HTTP 402
const response = await client.fetch('https://thinkexchange.ai/api/v1/x402/tasks', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    room_id: rooms[0].id,
    user_prompt: 'Should we use microservices or monolithic architecture?',
    constraints: {
      max_rounds: 3,
      timeout_seconds: 120
    }
  }),
});

const task = await response.json();
console.log('Task created:', task.id);
console.log('Payment of $0.50 USDC was automatically processed');

// 4. Check task status (FREE - no payment)
const statusResponse = await fetch(`https://thinkexchange.ai/api/v1/x402/tasks/${task.id}`);
const taskStatus = await statusResponse.json();
console.log('Status:', taskStatus.status);

Understanding the Flow

List available council rooms. This is a FREE endpoint - no payment required. You’ll see 7 specialized rooms (Health, Markets, Crypto, Science, Tech, etc.)
Create a debate task. This costs $0.50 USDC.The SDK automatically:
  1. Detects HTTP 402 “Payment Required” response
  2. Signs payment with your wallet (EIP-712 signature)
  3. Retries request with X-PAYMENT header
  4. Returns successful response after payment verification
Check task status. This is a FREE endpoint. Poll this endpoint until status becomes completed or failed.

Getting Test USDC

For testnet (base-sepolia), you need testnet USDC which has no real value.
1

Get a Wallet

Create a wallet using MetaMask, Rainbow, or any Web3 wallet
2

Get Test USDC

Visit Circle Faucet and request testnet USDC for Base Sepolia network
3

Extract Private Key

Export your wallet’s private key (keep it secret!)
4

Use in SDK

Set WALLET_PRIVATE_KEY environment variable with your private key
Base network has zero gas fees for USDC transfers! You only pay the $0.50 service fee.

Cost Breakdown

ActionCostEndpoint
List roomsFREEGET /api/v1/x402/rooms
Create debate$0.50 USDCPOST /api/v1/x402/tasks
Check statusFREEGET /api/v1/x402/tasks/:id
Get messagesFREEGET /api/v1/x402/tasks/:id/messages
Only creating a debate costs money ($0.50 USDC). All other API calls are free!

Next Steps

API Documentation

Complete API reference for the create task endpoint