x402

AI agents autonomously purchase credits and operate gaslessly using the x402 payment protocol.

x402 Autonomous Credit Management

Thirdfy AI Agents can autonomously purchase chat credits using the x402 payment protocol. When you run out of free credits, your agent handles payment automatically.

  • First in DeFi: Autonomous agent credit management
  • Truly Gasless: All agent operations are gasless
  • Self-Managing: Agents detect needs and purchase credits autonomously
  • Open Ecosystem: Any AI agent can discover and use Thirdfy services

How It Works

The Traditional Problem:

  • Users manually purchase API credits
  • Gas fees required for every transaction
  • Agents can't operate independently

The Thirdfy Solution:

You: "Find the best yield on Base and stake 1000 USDC"

Agent: "I've used today's 20 free requests. I'll purchase 
        1000 credits for $18 USDC. Approve?"

You: "Yes"

Agent: ✅ Credits purchased autonomously via x402
       ✅ Found optimal pool: 127% APY
       ✅ Staking 1000 USDC (gasless)
       
       Total cost: $18 USDC (credits) + $0 gas

The agent handles everything - from payment to execution, completely gaslessly.


Free Daily Credits

Every user gets 20 free AI chat requests per day. Perfect for testing and light usage.


Credit Packages

PackageCreditsPrice
Starter100$2.00 USDC
Standard1,000$18.00 USDC
Power10,000$160.00 USDC

Payment: USDC on Base (instant settlement, ~2 seconds)

Includes: AI model access, 75+ DeFi tools, gas sponsorship, real-time data


What You Need

Your agent's embedded wallet needs USDC on Base:

You: "Check my USDC balance"
Agent: "You have 50 USDC on Base - sufficient for credit purchases"

Getting USDC:

  • Buy on Coinbase and send to Base
  • Bridge from other chains using our bridge tools
  • Swap tokens for USDC

That's It!

Once your wallet has USDC, the agent can purchase credits automatically when needed.


Security

Agent controls:

  • Detects when credits are needed
  • Chooses appropriate package
  • Executes USDC payment on Base
  • Activates credits automatically

You control:

  • Approve or decline purchases
  • Set wallet spending limits
  • Monitor all transactions on-chain

On-Chain Transparency

Every purchase is recorded on Base:

  • View transaction on Basescan
  • See credits added to account
  • Complete payment history
  • Protected against double-charges

Discovery

Thirdfy is listed on x402scan.com, enabling:

  • Discovery by any AI agent
  • Transparent pricing across ecosystem
  • Open protocol participation
  • Verified service provider status

Any agent can discover and use Thirdfy - not just ours!


FAQ

Approximately 220 requests per 1000 credits for typical DeFi operations.

Can I see my balance?

Yes:

You: "How many credits do I have?"
Agent: "You have 847 credits remaining"

What if I run out mid-task?

The agent pauses, purchases credits (with your approval), then resumes - no data lost.

Can outside agents buy credits?

Yes! Any agent can discover Thirdfy on x402scan and purchase credits via our API.


For Developers

Outside developers can integrate Thirdfy's x402 credit system:

Discovery Endpoint:

GET https://api.thirdfy.com/api/v1/credits/x402-metadata

Purchase Endpoint:

POST /api/v1/credits/buy-with-x402
{ "sku": "credits_1000" }

See full API documentation in our x402 API reference


Resources