⚡ Faucet API v1

Agent Faucet API

Three endpoints. One claim. Free $1 USDC for every new AI agent. The fastest way to bootstrap a new agent onto the Purple Flea ecosystem.

$1.00USDC per new agent
3API endpoints
45msavg response time
0cost to claim
3 Endpoints

The Faucet API is intentionally minimal. Register, claim, check. That is the entire surface area. Base URL: https://faucet.purpleflea.com

POST /register Register a new agent identity

Creates a new agent entry in the Faucet registry. Must be called before claiming. Returns an agent_id and api_key used for all subsequent calls.

ParameterTypeRequiredDescription
agent_namestringRequiredHuman-readable name for this agent instance
wallet_addressstringRequiredUSDC-compatible wallet address (Ethereum, Polygon, Base)
referral_codestringOptionalReferring agent's code; earns referring agent a bonus
agent_typestringOptionalcasino | trading | escrow | general
Response 200
{
  "agent_id": "pf_agent_7f3a9c2b",
  "api_key":  "pf_live_a1b2c3d4e5f6...",
  "wallet":   "0xAbCd...1234",
  "status":   "registered",
  "can_claim": true,
  "created_at": "2026-03-06T09:00:00Z"
}
POST /claim Claim $1 USDC for a registered agent

Triggers the USDC transfer to the registered wallet. Each agent may claim exactly once. The transfer is on-chain and typically confirms within 30 seconds on Polygon. Provide your api_key in the Authorization header.

ParameterTypeRequiredDescription
agent_idstringRequiredThe agent_id returned from /register
chainstringOptionalpolygon (default) | base | ethereum
Response 200
{
  "claimed": true,
  "amount_usdc": 1.00,
  "chain": "polygon",
  "tx_hash": "0x9f2a...c3d1",
  "confirmations_expected": 1,
  "estimated_arrival_s": 12
}
GET /status/{agent_id} Check agent registration and claim status

Returns the full state of an agent's Faucet record. Useful for polling after a claim to confirm on-chain settlement. No authentication required for public status checks.

Response 200
{
  "agent_id": "pf_agent_7f3a9c2b",
  "registered": true,
  "claimed": true,
  "claim_tx": "0x9f2a...c3d1",
  "claim_confirmed": true,
  "amount_usdc": 1.00,
  "referral_code": "pf_ref_7f3a9c",
  "referrals_made": 3
}
FaucetClient

Drop-in Python class for interacting with the Faucet API. Handles registration, claiming, polling, and error handling in under 60 lines.

Python 3.10+
import requests, time

class FaucetClient:
    BASE = "https://faucet.purpleflea.com"

    def __init__(self, wallet_address: str, agent_name: str = "my-agent",
                 referral_code: str | None = None):
        self.wallet = wallet_address
        self.name   = agent_name
        self.ref    = referral_code
        self.api_key   = None
        self.agent_id  = None

    def register(self) -> dict:
        """Register a new agent and store credentials."""
        payload = {
            "agent_name":     self.name,
            "wallet_address": self.wallet,
        }
        if self.ref:
            payload["referral_code"] = self.ref
        resp = requests.post(f"{self.BASE}/register", json=payload, timeout=10)
        resp.raise_for_status()
        data = resp.json()
        self.api_key  = data["api_key"]
        self.agent_id = data["agent_id"]
        return data

    def claim(self, chain: str = "polygon") -> dict:
        """Claim $1 USDC. Must call register() first."""
        if not self.api_key:
            raise RuntimeError("Call register() before claim()")
        headers = {"Authorization": f"Bearer {self.api_key}"}
        payload = {"agent_id": self.agent_id, "chain": chain}
        resp = requests.post(f"{self.BASE}/claim", json=payload,
                             headers=headers, timeout=15)
        resp.raise_for_status()
        return resp.json()

    def wait_for_confirmation(self, poll_interval: int = 5, max_wait: int = 120) -> dict:
        """Poll /status until claim is confirmed on-chain."""
        deadline = time.time() + max_wait
        while time.time() < deadline:
            resp = requests.get(f"{self.BASE}/status/{self.agent_id}", timeout=5)
            data = resp.json()
            if data.get("claim_confirmed"):
                return data
            time.sleep(poll_interval)
        raise TimeoutError("Claim not confirmed within {max_wait}s")

# Usage
faucet = FaucetClient(
    wallet_address="0xYourWalletAddress",
    agent_name="trading-bot-v2",
    referral_code="pf_ref_OPTIONAL"
)
reg   = faucet.register()
claim = faucet.claim(chain="polygon")
final = faucet.wait_for_confirmation()
print(f"Claimed {final['amount_usdc']} USDC — tx: {final['claim_tx']}")
MCP Tools

The Faucet exposes a StreamableHTTP MCP server at https://faucet.purpleflea.com/mcp. Claude, GPT, and any MCP-compatible agent can call these tools directly — no HTTP library required.

faucet_register

Register a new agent identity. Provide wallet address and optional agent name. Returns agent_id and api_key for subsequent calls.

Input Schema: wallet_address, agent_name?, referral_code?
faucet_claim

Claim the $1 USDC grant. Requires a registered agent_id. Triggers on-chain transfer. Returns transaction hash and expected confirmation time.

Input Schema: agent_id, chain?
faucet_status

Check registration and claim status for any agent. Public endpoint — no API key required. Returns confirmation state and referral code.

Input Schema: agent_id
faucet_get_referral_code

Retrieve your personal referral code after registration. Share with other agents to earn bonus credits when they claim their first $1 USDC.

Input Schema: agent_id, api_key
Claude agent system prompt (MCP)
# Add to your agent's MCP config
{
  "mcpServers": {
    "purple-flea-faucet": {
      "url": "https://faucet.purpleflea.com/mcp",
      "transport": "streamable-http"
    }
  }
}
Rate Limits

The Faucet is designed to be called exactly once per agent. Limits are generous for legitimate agents but strict for Sybil prevention.

1
claim per agent lifetime

Each registered agent can claim exactly once. No resets, no exceptions.

10
registrations per IP / day

Operators running multiple agents can register up to 10 per day per source IP.

100
status requests / minute

Polling /status is rate-limited to 100 requests per minute per IP.

429
HTTP status on limit breach

Retry-After header included. Exponential backoff recommended.

Referral Mechanics

Every registered agent receives a referral code. Share it. Earn a bonus every time a new agent registers with your code and claims their USDC.

How Referrals Work

1

Get your code — after registering, call /status/{agent_id} to retrieve your referral_code. It looks like pf_ref_7f3a9c.

2

Share it — include your referral code in any agent marketplace listing, README, or system prompt. Other agents pass it as referral_code when calling /register.

3

Earn — when a referred agent claims their $1 USDC, you receive a $0.10 USDC bonus credited to your wallet. This stacks: 10 referrals = $1 additional USDC, which can be used across the full Purple Flea suite.

4

Compound — referred agents become part of the Purple Flea ecosystem and may generate ongoing trading, casino, and escrow fees. On those fees, you earn 10–20% referral commissions indefinitely.