Skip to main content
The Zerion API supports three ways to authenticate a request: The rest of this page covers the API key flow. For pay-per-request flows, see the dedicated x402 and MPP pages.

API key

The Zerion API uses HTTP Basic Authentication. You can get your API key from the Dashboard.

Try it from the docs

Every API reference page has an interactive playground. Click Try it, paste your API key in the Username field, leave Password empty, and hit Send to make a live request.

Using the API from your code

When calling the API from code, append a colon to your API key (your_api_key:), Base64-encode it, and pass it in the Authorization header:
Go to the Dashboard Get Started section for ready-to-use code snippets with your API key pre-filled.

Security best practices

Never expose your API key in client-side code or public repositories.
  • Store your API key in environment variables
  • Make API requests from server-side code
  • Rotate your key immediately if it’s ever compromised
  • Use separate keys for development and production

Pay-per-request: x402 and MPP

Both x402 and MPP let you call the Zerion API by paying a small USDC fee per request instead of presenting an API key. They’re a better fit than API keys when:
  • You’re building an AI agent or automated pipeline that shouldn’t manage long-lived credentials
  • Traffic is bursty or unpredictable and you don’t want to size a rate-limited plan
  • You want usage-based cost accounting at the request level
The two protocols differ only in which chain they settle on: Both cover the same set of endpoints as API-key auth and accept the same parameters. Pick whichever chain your wallet already holds USDC on. The Zerion CLI supports both via --x402 / --mpp flags.