Skip to main content

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-key on all routes
  • x-elfa-signature + x-elfa-timestamp on 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-secret for stream

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.225
  • expert (default): $1.00

Endpoint Variant Mapping

WorkflowAPI-key Docsx402 Variant
Builder chatPOST /v2/auto/chatPOST /x402/v2/auto/chat
Validate queryPOST /v2/auto/queries/validatePOST /x402/v2/auto/queries/validate
Create queryPOST /v2/auto/queriesPOST /x402/v2/auto/queries
Poll queryGET /v2/auto/queries/{queryId}POST /x402/v2/auto/queries/{queryId}
Stream eventsGET /v2/auto/queries/{queryId}/streamGET /x402/v2/auto/queries/{queryId}/stream
Cancel queryDELETE /v2/auto/queries/{queryId}DELETE /x402/v2/auto/queries/{queryId}
List sessionsGET /v2/auto/queries/{queryId}/sessionsPOST /x402/v2/auto/queries/{queryId}/sessions
Session detailsGET /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.