x402-Specific Instructions
Use this page when you want the same Auto workflows in keyless, pay-per-request mode.
The main Auto docs in this section are API-key first (/v2/auto/*).
For x402 mode, keep the same query/runtime concepts and switch auth + billing model.
Base URL
https://api.elfa.ai/x402/v2/auto
Authentication Differences
API-key mode (/v2/auto/*)
x-elfa-api-keyon all routesx-elfa-signature+x-elfa-timestampon mutation routes
x402 mode (/x402/v2/auto/*)
- No API key
- Use x402 payment headers:
PAYMENT-SIGNATURE(preferred)X-PAYMENT(legacy)
- Secret-based identity for Auto query routes:
- body:
{ "secret": "your-agent-secret" }on POST/DELETE query routes - header:
x-elfa-agent-secretfor stream
- body:
Pricing Differences
Query creation (POST /auto/queries)
x402 mode uses pay-per-request pricing based on simulation estimates:
- baseline:
$0.045 - fast LLM call:
+$0.225 - expert LLM call:
+$1.00
Builder chat (POST /auto/chat)
fast:$0.225expert(default):$1.00
Endpoint Variant Mapping
| Workflow | API-key Docs | x402 Variant |
|---|---|---|
| Builder chat | POST /v2/auto/chat | POST /x402/v2/auto/chat |
| Validate query | POST /v2/auto/queries/validate | POST /x402/v2/auto/queries/validate |
| Create query | POST /v2/auto/queries | POST /x402/v2/auto/queries |
| Poll query | GET /v2/auto/queries/{queryId} | POST /x402/v2/auto/queries/{queryId} |
| Stream events | GET /v2/auto/queries/{queryId}/stream | GET /x402/v2/auto/queries/{queryId}/stream |
| Cancel query | DELETE /v2/auto/queries/{queryId} | DELETE /x402/v2/auto/queries/{queryId} |
| List sessions | GET /v2/auto/queries/{queryId}/sessions | POST /x402/v2/auto/queries/{queryId}/sessions |
| Session details | GET /v2/auto/queries/{queryId}/sessions/{sessionId} | POST /x402/v2/auto/queries/{queryId}/sessions/{sessionId} |
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
For protocol-level payment setup, see x402 Payments.