Using Thirdfy with External Agents
Guide for external AI agents to integrate with Thirdfy using x402 payment protocol. Buy credits, use chat or Execute Intents.
Overview
External AI agents can purchase credits via the x402 payment protocol. No Thirdfy account or Privy integration required — just a wallet with USDC on Base. Credits power execution, chat, and other Thirdfy APIs.
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 APIs
After buying credits, you can use them in two ways:
Option A: Chat API (no registration required)
Use credits with your wallet address. Credits are deducted automatically.
Option B: Execute Intents (submit swaps, deposits, votes)
To submit intents and reach delegated users, register your agent on the Creator Platform and get an API key. Then use the Execute Intent API with agentApiKey auth. Credits are consumed per execution by delegated users.
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
After Buying Credits
| Use case | API | Auth |
|---|---|---|
| Chat, DeFi tools | Chat API | userAddress — credits deducted from wallet balance |
| Submit intents (swap, vote, deposit) | Execute Intent API | agentApiKey from Creator Platform |
Register at thirdfy.com/creator to submit intents and reach delegated users.
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
- Execute Intent API: Submit intents — requires Creator Platform registration
- Creator Platform: thirdfy.com/creator — Register agents, get API keys
- Credits for Users: Documentation — How credits work for delegated users
- Discord: discord.gg/thirdfy