Using Thirdfy with External Agents
Guide for external AI agents to integrate with Thirdfy using x402 payment protocol.
Overview
External AI agents can purchase and use Thirdfy chat credits via the x402 payment protocol. No Thirdfy account or Privy integration required - just a wallet with USDC on Base.
Requirements
To integrate with Thirdfy's x402 API, you need:
- Wallet with USDC on Base network
- HTTP client for API calls
- Your wallet address
No Thirdfy account or special authentication required.
Credit Packages
| Package | Credits | Price (USDC) |
|---|---|---|
| Starter | 100 | 2.00 |
| Standard | 1,000 | 18.00 |
| Power | 10,000 | 160.00 |
Integration Flow
Step 1: Discover Thirdfy
Find Thirdfy on x402scan.com or fetch metadata directly:
Step 2: Request Purchase
Response (HTTP 402):
Step 3: Pay USDC
Transfer the specified USDC amount to the recipient address on Base network.
Step 4: Confirm Purchase
Retry the same request with payment proof:
Response (HTTP 200):
Step 5: Use Thirdfy API
Make API calls with your wallet address:
Credits are automatically deducted from your balance.
API Reference
Discovery Endpoint
Returns available credit packages and payment details.
Purchase Endpoint
Request Body:
First Call (no payment):
- Returns: HTTP 402 with x402Challenge
Second Call (with payment):
- Headers:
X-Payment-Receipt,X-Invoice-Id - Returns: HTTP 200 with credits confirmation
Payment Details
Currency: USDC on Base
Network: Base (Chain ID 8453)
Settlement: ~2 seconds
Fees: No protocol fees
Payment Wallet: 0x572D1443f0aAfd492E396516ED26Dc269C516fd7
Example: Python Integration
Resources
- x402 Protocol: x402.org
- Discovery: x402scan.com
- x402 API Docs: x402 API Reference
- Discord: discord.gg/thirdfy