Skip to main content

Get Your API Key

API keys are required for servers that want to protect endpoints with x402 payments. Clients (users paying for APIs) don’t need an API key.
API keys are free to create. You only need a wallet to sign in.

Step 1: Go to the Dashboard

Visit the facilitator dashboard: facilitator.agentokratia.com
API keys are tied to your receiving wallet - the address where you get paid. One key lets you settle on any EVM network the facilitator supports. Sessions are created per-network.

Step 2: Connect Your Wallet

Click “Connect Wallet” and sign in using SIWE (Sign-In with Ethereum). Supported wallets:
  • MetaMask
  • Coinbase Wallet
  • WalletConnect
  • Rainbow
  • Any EIP-1193 compatible wallet
You’ll be asked to sign a message like:
facilitator.agentokratia.com wants you to sign in with your Ethereum account:
0xYourAddress...

Sign in to x402 Facilitator

URI: https://facilitator.agentokratia.com
Version: 1
Chain ID: 8453
Nonce: abc123xyz
Issued At: 2024-01-01T00:00:00.000Z
This is a signature, not a transaction. It costs no gas and moves no funds.

Step 3: Create an API Key

After signing in:
  1. Navigate to API Keys section
  2. Click “Create New Key”
  3. Enter a name (e.g., “Production Server” or “Development”)
  4. Click “Create”

Step 4: Copy and Save Your Key

Your API key will be displayed once:
x402_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Save this immediately! The key is shown only once and cannot be retrieved later. If you lose it, you’ll need to create a new one.
Store your key securely:
  • Use environment variables (never commit to git)
  • Use a secrets manager (AWS Secrets Manager, Vault, etc.)
  • For local development, use .env files (add to .gitignore)

Step 5: Add to Your Server

.env
FACILITATOR_URL=https://facilitator.agentokratia.com

# Your API key (works on all networks)
X402_API_KEY=x402_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Then in your code:
const facilitator = new HTTPFacilitatorClient({
  url: process.env.FACILITATOR_URL!,
  createAuthHeaders: async () => ({
    verify: { Authorization: `Bearer ${process.env.X402_API_KEY}` },
    settle: { Authorization: `Bearer ${process.env.X402_API_KEY}` },
    supported: {},
  }),
});

API Key Scope

ScopeDescription
Receiving WalletAPI keys are tied to your receiving wallet address (where you get paid)
All NetworksSame key works on any EVM-compatible network the facilitator supports
Per ServiceUse one API key to integrate your service with the facilitator
SessionsSessions are created per-network (each session lives on one chain)
One API key = one integration. You can settle payments on any supported network (Base Mainnet, Base Sepolia, etc.) using the same key. The network is specified per-request when settling.

Rate Limits

EndpointLimit
/api/verify1000/min per key
/api/settle1000/min per key
Need higher limits? Contact us.

Managing Keys

From the dashboard you can:
  • View all your API keys (names and creation dates)
  • Create new keys anytime
  • Revoke keys (coming soon)

Next Steps