Authentication
How to authenticate queries using the x402 standard or API keys
Base Screener supports two authentication methods: x402 payments for production and API keys for development.
x402 payments (production)
- Send Query — POST your GraphQL query to the API without any auth headers
- Receive 402 — Server calculates query complexity and responds with HTTP
402 Payment Required - Sign Payment — Your agent constructs a Permit2 gasless USDC authorization
- Retry — Re-send with the signed payload in the
PAYMENT-SIGNATUREheader - Receive Data — Payment is verified and settled via Coinbase facilitator, data is returned
Using a library like Coinbase AgentKit automates this entire flow — the 402 → sign → retry cycle is handled transparently.
See How x402 Payments Work for the full protocol breakdown.
API keys (development)
For testing during development, pass the X-API-Key header to bypass x402:
bashcurl -X POST https://apitoken.agentchaintools.xyz/graphql \ -H "Content-Type: application/json" \ -H "X-API-Key: sk_test_your_key_here" \ -d '{"query": "{ newTokens(limit: 3) { tokens { symbol } } }"}'
API keys have a credit balance (in complexity units) that decreases with each query. When credits run out, the API returns 402 and you'll need to top up or switch to x402 payments.
GraphQL introspection
Standard GraphQL introspection (__schema, __type queries) is always free — no payment or API key required. This lets agents discover the schema dynamically.
Schema endpoint
bashcurl https://apitoken.agentchaintools.xyz/schema
Returns the raw GraphQL SDL as plain text. Cached for 1 hour. No auth required.