x402 (Auto)
Use this page for keyless, pay-per-request Auto access on /x402/v2/auto/*.
If you still need to choose between API key and x402 models, start with Auto Overview.
Base URL
https://api.elfa.ai/x402/v2/auto
Required Auth and Identity
x402 mode does not use API keys or HMAC. Use x402 payment headers on requests:
PAYMENT-SIGNATURE(preferred)X-PAYMENT(legacy)
x402 Auto supports webhook, notify, telegram_bot, and llm actions only.
market_order and limit_order are not available on /x402/v2/auto/*.
Use API key mode (/v2/auto/*) for exchange-backed order execution.
Auto query routes in x402 use a secret-based identity via header:
- include
x-elfa-agent-secreton validate, create, poll, cancel, list sessions, get session, and stream routes
Agent Secret Management (Generate Once, Reuse Always)
For x402 Auto, your secret is the agent identity for query/session ownership.
Generate a strong secret once when your agent is initialized:
openssl rand -hex 32
or
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Then persist it in long-term storage (secret manager, encrypted env config, or agent memory store) and reuse the same value for all query lifecycle calls.
Recommended pattern:
- Generate once at onboarding.
- Save as
ELFA_AGENT_SECRET(or equivalent). - Reuse the same secret for create, poll, cancel, sessions, and stream calls.
- Do not regenerate per request or per session.
Why this matters:
- x402 session ownership is derived from
SHA256(secret). - If you change secrets, your agent identity changes.
- Existing query/session access may fail or appear missing under the new identity.
Pricing (Auto x402)
Auto x402 is currently offered at a 70% discount (limited-time), making it the most cost-efficient option for agent workflows.
Builder chat (POST /x402/v2/auto/chat)
fast:5 credits($0.045)expert(default):18 credits($0.162)
Query creation (POST /x402/v2/auto/queries)
- baseline:
5 credits($0.045) - per fast LLM call:
+5 credits(+$0.045) - per expert LLM call:
+18 credits(+$0.162)
Endpoint Reference
For Auto x402 endpoint details, use the API reference pages:
- Auto Builder chat
- Validate query
- Create query
- Poll query
- Stream notifications
- Cancel query
- List sessions
- Session details
When to Choose x402
Use x402 Auto when you want:
- keyless integration (wallet-based access)
- request-by-request billing in USDC
- agent flows without API key provisioning
Related Docs
- Model selection and call mapping: Auto Overview
- API key + HMAC mode: API Key + HMAC
- Protocol-level payment setup: x402 Payments
- Cross-product auth summary: Authentication