Skip to main content
DocketLayer has no API keys, no accounts, and no onboarding. Authentication is handled entirely through the x402 payment protocol — your agent pays $0.99 in USDC on Solana, and that payment is your authorization to receive the data.

How x402 works

When your agent calls a DocketLayer endpoint, the flow is:
  1. Your agent makes a GET request to /v1/case with no payment header
  2. DocketLayer responds with HTTP 402 Payment Required containing machine-readable payment details — the price, recipient wallet address, and accepted currency
  3. Your x402 client library reads this response, constructs a $0.99 USDC transaction on Solana, signs it with your wallet’s private key, and retries the request with cryptographic proof of payment attached
  4. DocketLayer verifies the payment on-chain and returns the docket data
From your code’s perspective, this is a single function call. The x402 library handles the 402 challenge, payment, and retry automatically.

What you need

Solana wallet

A programmatic wallet with a private key stored as an environment variable

USDC balance

Enough USDC on Solana to cover your expected query volume at $0.99 per query

x402 library

The x402 client library for Python or JavaScript, configured with your wallet

No API key

There are no API keys to request, manage, or rotate

x402 client setup

from x402 import PaymentClient

client = PaymentClient(
    private_key=os.environ["SOLANA_PRIVATE_KEY"],
    network="solana-mainnet",
    currency="USDC"
)

Security

Never hardcode your private key in source code or commit it to a repository. Load it exclusively from environment variables or a secrets manager.
  • Use a dedicated wallet for your agent — not a personal wallet holding significant funds
  • Fund it with only what the agent needs to operate
  • Monitor your wallet balance — a depleted wallet causes all queries to fail
  • If your private key is ever exposed, generate a new wallet immediately and transfer remaining USDC

Free endpoint

The /v1/status endpoint requires no payment and can be used to check coverage and connectivity without consuming any USDC.
curl https://api.docketlayer.com/v1/status

Further reading