Skip to main content

Why DNS discovery

Agents with internet access can resolve DNS before making any HTTP request. If you publish your L402 endpoint as a DNS TXT record, agents discover it automatically — even before hitting your API.

TXT record format

Fields:
  • v=l402 — protocol identifier
  • endpoint= — your L402-protected URL
  • price= — price in sats (optional, informational)
  • docs= — link to your docs (optional)

Setup on Cloudflare

  1. Go to Cloudflare Dashboard → DNS
  2. Add a new record:

Verify with dig

How agents use it

l402-kit’s own record

The example below uses a fictional domain (api.example.com) to illustrate the format — replace it with your real endpoint.

Benefits

  • Zero HTTP overhead — discovery before any API call
  • Agent-native — DNS is how machines find services, not humans
  • No API key needed — completely open discovery
  • Cacheable — TTL controls how often agents re-resolve
See .well-known/agent.json for the complementary HTTP discovery standard.