{
  "version": 1,
  "generatedAt": "2026-04-15T03:21:24.899Z",
  "source": {
    "openapi": "/swagger/swagger.json",
    "docsDirectory": "/api/rest"
  },
  "endpointCount": 53,
  "endpoints": [
    {
      "operationId": "auto-disconnect-exchange-v2",
      "method": "DELETE",
      "path": "/v2/auto/exchanges/{exchange}",
      "docsUrl": "/api/rest/auto-disconnect-exchange-v-2",
      "summary": "Disconnect Exchange",
      "description": "Disconnect an exchange integration.\n\nRequires HMAC request signing.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key",
          "x-elfa-timestamp",
          "x-elfa-signature"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": true,
        "signaturePathTemplate": "/exchanges/{exchange}",
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-cancel-query-v2",
      "method": "DELETE",
      "path": "/v2/auto/queries/{queryId}",
      "docsUrl": "/api/rest/auto-cancel-query-v-2",
      "summary": "Cancel Query",
      "description": "Cancel an active query.\n\n### Cost\n\nFree.\n\n### Auth\n\nRequired headers:\n```http\nx-elfa-api-key: <api_key>\nx-elfa-timestamp: <unix_seconds>\nx-elfa-signature: <hex_hmac_sha256>\n```\n\nSigning payload:\n```text\ntimestamp + method + path + body\n```\n\nFor this route, sign with `path = \"/queries/{queryId}\"` and `body = \"\"`.\n\n### Request Example\n\nPath parameter:\n- `queryId` (string)\n\n### Response Example (200)\n\n```json\n{\n  \"id\": \"q_123\",\n  \"status\": \"cancelled\",\n  \"cancelledAt\": \"2026-04-01T12:00:00.000Z\"\n}\n```\n\n> Best practice: keep cancellation idempotent in your client workflow;\n> treat repeated cancel attempts as safe no-op behavior.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key",
          "x-elfa-timestamp",
          "x-elfa-signature"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": true,
        "signaturePathTemplate": "/queries/{queryId}",
        "agentSecretRequired": false
      },
      "cost": {
        "model": "free",
        "notes": "Free."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-delete-query-draft-v2",
      "method": "DELETE",
      "path": "/v2/auto/queries/drafts/{draftId}",
      "docsUrl": "/api/rest/auto-delete-query-draft-v-2",
      "summary": "Delete Query Draft",
      "description": "Delete a query draft.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-auto-cancel-query",
      "method": "DELETE",
      "path": "/x402/v2/auto/queries/{queryId}",
      "docsUrl": "/api/rest/x-402-auto-cancel-query",
      "summary": "Cancel query",
      "description": "Cancel an active query.\nRequires `x-elfa-agent-secret` header.\n\n**Cost:** Free",
      "tags": [
        "x402"
      ],
      "beta": true,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT",
          "x-elfa-agent-secret"
        ],
        "securitySchemes": [],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": true
      },
      "cost": {
        "model": "free",
        "notes": "Free"
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "id": "string",
          "status": "string",
          "cancelledAt": "string"
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "getAccountSmartStats-v2",
      "method": "GET",
      "path": "/v2/account/smart-stats",
      "docsUrl": "/api/rest/get-account-smart-stats-v-2",
      "summary": "Smart stats of accounts",
      "description": "This experimental endpoint is under active development and its behavior may change without notice.\nUse with caution in production environments.\n\nRetrieve smart stats given username",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "averageReach": 1,
            "averageEngagement": 1,
            "smartFollowingCount": 1
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "getTrendingCAsTelegram-v2",
      "method": "GET",
      "path": "/v2/aggregations/trending-cas/telegram",
      "docsUrl": "/api/rest/get-trending-c-as-telegram-v-2",
      "summary": "Trending contract addresses on Telegram",
      "description": "Get trending contract addresses mentioned on Telegram. Returns contract addresses with mention counts.\n\nNote: You must provide EITHER timeWindow OR both from and to parameters.\nIf both timeWindow and from/to are provided, from/to takes priority.",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "pageSize": 1,
            "page": 1,
            "total": 1,
            "data": [
              {
                "contractAddress": "string",
                "chain": "ethereum",
                "mentionCount": 1
              }
            ]
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "getTrendingCAsTwitter-v2",
      "method": "GET",
      "path": "/v2/aggregations/trending-cas/twitter",
      "docsUrl": "/api/rest/get-trending-c-as-twitter-v-2",
      "summary": "Trending contract addresses on Twitter",
      "description": "Get trending contract addresses mentioned on Twitter/X. Returns contract addresses with mention counts.\n\nNote: You must provide EITHER timeWindow OR both from and to parameters.\nIf both timeWindow and from/to are provided, from/to takes priority.",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "pageSize": 1,
            "page": 1,
            "total": 1,
            "data": [
              {
                "contractAddress": "string",
                "chain": "ethereum",
                "mentionCount": 1
              }
            ]
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "getTrendingTokens-v2",
      "method": "GET",
      "path": "/v2/aggregations/trending-tokens",
      "docsUrl": "/api/rest/get-trending-tokens-v-2",
      "summary": "Trending tokens",
      "description": "This experimental endpoint is under active development and its behavior may change without notice.\nUse with caution in production environments.\n\nRetrieve trending tokens based on highest mentions count,\nfiltered by a minimum mention threshold over a specified time period.\n\nNote: You must provide EITHER timeWindow OR both from and to parameters.\nIf both timeWindow and from/to are provided, from/to takes priority.",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "pageSize": 1,
            "page": 1,
            "total": 1,
            "data": [
              {
                "change_percent": 1,
                "previous_count": 1,
                "current_count": 1,
                "token": "string"
              }
            ]
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-list-exchanges-v2",
      "method": "GET",
      "path": "/v2/auto/exchanges",
      "docsUrl": "/api/rest/auto-list-exchanges-v-2",
      "summary": "List Exchanges",
      "description": "List connected exchanges.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-list-executions-v2",
      "method": "GET",
      "path": "/v2/auto/executions",
      "docsUrl": "/api/rest/auto-list-executions-v-2",
      "summary": "List Executions",
      "description": "List execution records.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-get-execution-v2",
      "method": "GET",
      "path": "/v2/auto/executions/{executionId}",
      "docsUrl": "/api/rest/auto-get-execution-v-2",
      "summary": "Get Execution",
      "description": "Get a single execution record.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-list-queries-v2",
      "method": "GET",
      "path": "/v2/auto/queries",
      "docsUrl": "/api/rest/auto-list-queries-v-2",
      "summary": "List Queries",
      "description": "List Auto queries for the authenticated API-key user.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-poll-query-v2",
      "method": "GET",
      "path": "/v2/auto/queries/{queryId}",
      "docsUrl": "/api/rest/auto-poll-query-v-2",
      "summary": "Poll Query",
      "description": "Check query status and execution results.\n\n### Cost\n\nFree.\n\n### Auth\n\nRequired header:\n```http\nx-elfa-api-key: <api_key>\n```\n\n### Request Example\n\nPath parameter:\n- `queryId` (string)\n\n### Response Example (200)\n\n```json\n{\n  \"queryId\": \"q_123\",\n  \"status\": \"active\",\n  \"latestEvaluation\": {\n    \"evaluatedAt\": \"2026-04-01T12:00:00.000Z\",\n    \"wouldTriggerNow\": false\n  },\n  \"executions\": [\n    {\n      \"id\": \"exec_123\",\n      \"queryId\": \"q_123\",\n      \"type\": \"llm\",\n      \"status\": \"failed\",\n      \"error\": {\n        \"code\": \"LLM_ACTION_UPSTREAM_ERROR\",\n        \"message\": \"Failed to execute llm action\"\n      },\n      \"createdAt\": \"2026-04-01T12:00:01.000Z\"\n    }\n  ]\n}\n```\n\n> Best practice: use polling for debugging or backfills. For production\n> delivery, prefer webhook/SSE notifications.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "free",
        "notes": "Free."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "queryId": "string",
          "status": "string",
          "latestEvaluation": {
            "evaluatedAt": "string",
            "wouldTriggerNow": true
          },
          "executions": [
            {
              "id": "string",
              "queryId": "string",
              "type": "string",
              "status": "string",
              "createdAt": "string"
            }
          ]
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-list-sessions-v2",
      "method": "GET",
      "path": "/v2/auto/queries/{queryId}/sessions",
      "docsUrl": "/api/rest/auto-list-sessions-v-2",
      "summary": "List LLM Sessions",
      "description": "List LLM output sessions for a query.\nOnly relevant for queries with `actions[0].type: \"llm\"`.\n\n### Cost\n\nFree.\n\n### Auth\n\nRequired header:\n```http\nx-elfa-api-key: <api_key>\n```\n\n### Request Example\n\nPath parameter:\n- `queryId` (string)\n\n### Response Example (200)\n\n```json\n{\n  \"queryId\": \"q_123\",\n  \"sessions\": [\n    {\n      \"sessionId\": \"s_1\",\n      \"status\": \"completed\",\n      \"executedAt\": \"2026-04-01T12:00:00.000Z\"\n    }\n  ]\n}\n```\n\n> Best practice: store `sessionId` values from executions so you can fetch\n> full analysis records only when needed.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "free",
        "notes": "Free."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "sessions": [
            {
              "sessionId": "string",
              "status": "string",
              "executedAt": "string"
            }
          ]
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-get-session-v2",
      "method": "GET",
      "path": "/v2/auto/queries/{queryId}/sessions/{sessionId}",
      "docsUrl": "/api/rest/auto-get-session-v-2",
      "summary": "LLM Session Details",
      "description": "Get full LLM analysis output for a specific session.\n\n### Cost\n\nFree.\n\n### Auth\n\nRequired header:\n```http\nx-elfa-api-key: <api_key>\n```\n\n### Request Example\n\nPath parameters:\n- `queryId` (string)\n- `sessionId` (string)\n\n### Response Example (200)\n\n```json\n{\n  \"sessionId\": \"s_1\",\n  \"queryId\": \"q_123\",\n  \"title\": \"Token analysis\",\n  \"analysisType\": \"tokenAnalysis\",\n  \"createdAt\": \"2026-04-01T12:00:00.000Z\",\n  \"messages\": [\n    {\n      \"query\": \"Analyze BTC\",\n      \"response\": \"...\",\n      \"status\": \"completed\",\n      \"analysisType\": \"tokenAnalysis\",\n      \"timestamp\": \"2026-04-01T12:00:00.000Z\",\n      \"trades\": []\n    }\n  ]\n}\n```\n\n> Best practice: treat top-level and message-level fields as nullable and\n> handle partial records defensively in your parser.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "free",
        "notes": "Free."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-stream-query-v2",
      "method": "GET",
      "path": "/v2/auto/queries/{queryId}/stream",
      "docsUrl": "/api/rest/auto-stream-query-v-2",
      "summary": "Stream Notifications",
      "description": "Stream query notifications via Server-Sent Events (SSE).\n\n### Cost\n\nFree.\n\n### Auth\n\nRequired header:\n```http\nx-elfa-api-key: <api_key>\n```\n\n### Request Example\n\nPath parameter:\n- `queryId` (string)\n\n### Response Example (200)\n\n- `Content-Type: text/event-stream`\n- stream remains open and emits incremental SSE events\n\n> Best practice: deduplicate SSE events by event id and process with a\n> queue-backed worker for reliable agent execution.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "free",
        "notes": "Free."
      },
      "requestExample": null,
      "responseExamples": null,
      "successStatuses": [
        200,
        204
      ],
      "errorStatuses": [
        401,
        404,
        410
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-list-query-drafts-v2",
      "method": "GET",
      "path": "/v2/auto/queries/drafts",
      "docsUrl": "/api/rest/auto-list-query-drafts-v-2",
      "summary": "List Query Drafts",
      "description": "List editable query drafts.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-get-query-draft-v2",
      "method": "GET",
      "path": "/v2/auto/queries/drafts/{draftId}",
      "docsUrl": "/api/rest/auto-get-query-draft-v-2",
      "summary": "Get Query Draft",
      "description": "Get a specific query draft (legacy; prefer GET /queries/{queryId} which resolves query or draft).",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-validate-symbol-v2",
      "method": "GET",
      "path": "/v2/auto/validate-symbol/{symbol}",
      "docsUrl": "/api/rest/auto-validate-symbol-v-2",
      "summary": "Validate Symbol Support",
      "description": "Check if a symbol is supported for Auto query conditions.\n\n### Cost\n\nFree.\n\n### Auth\n\nRequired header:\n```http\nx-elfa-api-key: <api_key>\n```\n\nHMAC signing is not required for this check.\n\n### Response Example (200)\n\n```json\n{\n  \"supported\": \"true\"\n}\n```",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key",
          "x-elfa-timestamp",
          "x-elfa-signature"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": true,
        "signaturePathTemplate": "/validate-symbol/{symbol}",
        "agentSecretRequired": false
      },
      "cost": {
        "model": "free",
        "notes": "Free."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "supported": "true"
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401,
        403
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "getEventSummary-v2",
      "method": "GET",
      "path": "/v2/data/event-summary",
      "docsUrl": "/api/rest/get-event-summary-v-2",
      "summary": "Event summary from keyword mentions (5 credits total)",
      "description": "Generate event summaries based on keyword mentions within a time period.\nThis endpoint costs 5 credits total",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": [
            {
              "tweetIds": [
                "string"
              ],
              "sourceLinks": [
                "string"
              ],
              "summary": "string"
            }
          ]
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "getKeywordMentions-v2",
      "method": "GET",
      "path": "/v2/data/keyword-mentions",
      "docsUrl": "/api/rest/get-keyword-mentions-v-2",
      "summary": "Multi keyword mentions search",
      "description": "Search mentions by keywords OR account name with time period.",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": [
            {
              "tweetId": "string",
              "link": "string",
              "likeCount": 1,
              "repostCount": 1,
              "viewCount": 1,
              "quoteCount": 1,
              "replyCount": 1,
              "bookmarkCount": 1,
              "mentionedAt": "string",
              "type": "repost",
              "repostBreakdown": {
                "ct": 1,
                "smart": 1
              }
            }
          ],
          "metadata": {
            "total": 1
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "getTokenNews-v2",
      "method": "GET",
      "path": "/v2/data/token-news",
      "docsUrl": "/api/rest/get-token-news-v-2",
      "summary": "Token news mentions",
      "description": "Retrieve token-related news mentions.",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": [
            {
              "tweetId": "string",
              "link": "string",
              "likeCount": 1,
              "repostCount": 1,
              "viewCount": 1,
              "quoteCount": 1,
              "replyCount": 1,
              "bookmarkCount": 1,
              "mentionedAt": "string",
              "type": "repost",
              "repostBreakdown": {
                "ct": 1,
                "smart": 1
              }
            }
          ],
          "metadata": {
            "pageSize": 1,
            "page": 1,
            "total": 1
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "getTopMentions-v2",
      "method": "GET",
      "path": "/v2/data/top-mentions",
      "docsUrl": "/api/rest/get-top-mentions-v-2",
      "summary": "Top mentions",
      "description": "Returns the most significant mentions for a given ticker symbol, ranked by relevance and engagement within a specified time window.",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": [
            {
              "tweetId": "string",
              "link": "string",
              "likeCount": 1,
              "repostCount": 1,
              "viewCount": 1,
              "quoteCount": 1,
              "replyCount": 1,
              "bookmarkCount": 1,
              "mentionedAt": "string",
              "type": "repost",
              "repostBreakdown": {
                "ct": 1,
                "smart": 1
              }
            }
          ],
          "metadata": {
            "pageSize": 1,
            "page": 1,
            "total": 1
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "getTrendingNarratives-v2",
      "method": "GET",
      "path": "/v2/data/trending-narratives",
      "docsUrl": "/api/rest/get-trending-narratives-v-2",
      "summary": "Trending narratives (5 credits total)",
      "description": "Get trending narratives based on Twitter mentions analysis.\nThis endpoint costs 5 credits total",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "metadata": {
              "error": "string",
              "total_tweets": 1,
              "total_narratives": 1
            },
            "trending_narratives": [
              {
                "tweet_ids": [
                  "string"
                ],
                "source_links": [
                  "string"
                ],
                "narrative": "string"
              }
            ]
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "getApiKeyStatus-v2",
      "method": "GET",
      "path": "/v2/key-status",
      "docsUrl": "/api/rest/get-api-key-status-v-2",
      "summary": "API key status",
      "description": "Retrieve the current status and usage of your API key",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "id": 1,
            "key": "string",
            "name": "string",
            "status": "active",
            "dailyRequestLimit": 1,
            "monthlyRequestLimit": 1,
            "expiresAt": "string",
            "createdAt": "string",
            "updatedAt": "string",
            "requestsPerMinute": 1,
            "email": "string",
            "project": "string",
            "allowOverage": true,
            "maxOverage": 1,
            "tier": "string",
            "usage": {
              "monthly": 1,
              "daily": 1
            },
            "limits": {
              "monthly": 1,
              "daily": 1
            },
            "isExpired": true,
            "remainingRequests": {
              "monthly": 1,
              "daily": 1
            }
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "ping-v2",
      "method": "GET",
      "path": "/v2/ping",
      "docsUrl": "/api/rest/ping-v-2",
      "summary": "Health check endpoint",
      "description": "Simple health check to verify API availability",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [],
        "securitySchemes": [],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "message": "string"
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-get-account-smart-stats-v2",
      "method": "GET",
      "path": "/x402/v2/account/smart-stats",
      "docsUrl": "/api/rest/x-402-get-account-smart-stats-v-2",
      "summary": "Smart stats of accounts",
      "description": "Retrieve smart account statistics for a username.\n\n**Cost:** 1 credit ($0.009). Requires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": false,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "fixed",
        "notes": "1 credit ($0.009). Requires x402 payment."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "averageReach": 1,
            "averageEngagement": 1,
            "smartFollowingCount": 1
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        402
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-get-trending-cas-telegram-v2",
      "method": "GET",
      "path": "/x402/v2/aggregations/trending-cas/telegram",
      "docsUrl": "/api/rest/x-402-get-trending-cas-telegram-v-2",
      "summary": "Trending contract addresses on Telegram",
      "description": "Retrieve trending contract addresses on Telegram.\n\n**Cost:** 1 credit ($0.009). Requires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": false,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "fixed",
        "notes": "1 credit ($0.009). Requires x402 payment."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "pageSize": 1,
            "page": 1,
            "total": 1,
            "data": [
              {
                "contractAddress": "string",
                "chain": "ethereum",
                "mentionCount": 1
              }
            ]
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        402
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-get-trending-cas-twitter-v2",
      "method": "GET",
      "path": "/x402/v2/aggregations/trending-cas/twitter",
      "docsUrl": "/api/rest/x-402-get-trending-cas-twitter-v-2",
      "summary": "Trending contract addresses on Twitter",
      "description": "Retrieve trending contract addresses on Twitter.\n\n**Cost:** 1 credit ($0.009). Requires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": false,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "fixed",
        "notes": "1 credit ($0.009). Requires x402 payment."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "pageSize": 1,
            "page": 1,
            "total": 1,
            "data": [
              {
                "contractAddress": "string",
                "chain": "ethereum",
                "mentionCount": 1
              }
            ]
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        402
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-get-trending-tokens-v2",
      "method": "GET",
      "path": "/x402/v2/aggregations/trending-tokens",
      "docsUrl": "/api/rest/x-402-get-trending-tokens-v-2",
      "summary": "Trending tokens",
      "description": "Retrieve trending tokens based on mention activity and momentum.\n\n**Cost:** 1 credit ($0.009). Requires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": false,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "fixed",
        "notes": "1 credit ($0.009). Requires x402 payment."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "pageSize": 1,
            "page": 1,
            "total": 1,
            "data": [
              {
                "change_percent": 1,
                "previous_count": 1,
                "current_count": 1,
                "token": "string"
              }
            ]
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        402
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-auto-stream-notifications",
      "method": "GET",
      "path": "/x402/v2/auto/queries/{queryId}/stream",
      "docsUrl": "/api/rest/x-402-auto-stream-notifications",
      "summary": "Stream query notifications",
      "description": "Stream query notifications via Server-Sent Events (SSE).\nRequires `x-elfa-agent-secret` header.\n\n**Cost:** Free",
      "tags": [
        "x402"
      ],
      "beta": true,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT",
          "x-elfa-agent-secret"
        ],
        "securitySchemes": [],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": true
      },
      "cost": {
        "model": "free",
        "notes": "Free"
      },
      "requestExample": null,
      "responseExamples": null,
      "successStatuses": [
        200,
        204
      ],
      "errorStatuses": [
        400,
        404,
        410
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-auto-validate-symbol",
      "method": "GET",
      "path": "/x402/v2/auto/validate-symbol/{symbol}",
      "docsUrl": "/api/rest/x-402-auto-validate-symbol",
      "summary": "Validate symbol support",
      "description": "Check if a symbol is supported for Auto query conditions.\n\n**Cost:** Free",
      "tags": [
        "x402"
      ],
      "beta": true,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "free",
        "notes": "Free"
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "supported": "true"
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-get-event-summary-v2",
      "method": "GET",
      "path": "/x402/v2/data/event-summary",
      "docsUrl": "/api/rest/x-402-get-event-summary-v-2",
      "summary": "Event summary from keyword mentions (5 credits total)",
      "description": "Get event summary generated from keyword mention windows.\n\n**Cost:** 5 credits ($0.045). Requires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": false,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "fixed",
        "notes": "5 credits ($0.045). Requires x402 payment."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": [
            {
              "tweetIds": [
                "string"
              ],
              "sourceLinks": [
                "string"
              ],
              "summary": "string"
            }
          ]
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        402
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-get-keyword-mentions-v2",
      "method": "GET",
      "path": "/x402/v2/data/keyword-mentions",
      "docsUrl": "/api/rest/x-402-get-keyword-mentions-v-2",
      "summary": "Multi keyword mentions search",
      "description": "Search mentions by keywords or account with cursor pagination.\n\n**Cost:** 1 credit ($0.009). Requires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": false,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "fixed",
        "notes": "1 credit ($0.009). Requires x402 payment."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": [
            {
              "tweetId": "string",
              "link": "string",
              "likeCount": 1,
              "repostCount": 1,
              "viewCount": 1,
              "quoteCount": 1,
              "replyCount": 1,
              "bookmarkCount": 1,
              "mentionedAt": "string",
              "type": "repost",
              "repostBreakdown": {
                "ct": 1,
                "smart": 1
              }
            }
          ],
          "metadata": {
            "total": 1
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        402
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-get-token-news-v2",
      "method": "GET",
      "path": "/x402/v2/data/token-news",
      "docsUrl": "/api/rest/x-402-get-token-news-v-2",
      "summary": "Token news mentions",
      "description": "Get token-related news mention feed.\n\n**Cost:** 1 credit ($0.009). Requires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": false,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "fixed",
        "notes": "1 credit ($0.009). Requires x402 payment."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": [
            {
              "tweetId": "string",
              "link": "string",
              "likeCount": 1,
              "repostCount": 1,
              "viewCount": 1,
              "quoteCount": 1,
              "replyCount": 1,
              "bookmarkCount": 1,
              "mentionedAt": "string",
              "type": "repost",
              "repostBreakdown": {
                "ct": 1,
                "smart": 1
              }
            }
          ],
          "metadata": {
            "pageSize": 1,
            "page": 1,
            "total": 1
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        402
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-get-top-mentions-v2",
      "method": "GET",
      "path": "/x402/v2/data/top-mentions",
      "docsUrl": "/api/rest/x-402-get-top-mentions-v-2",
      "summary": "Top mentions",
      "description": "Returns the most significant mentions for a given ticker symbol.\n\n**Cost:** 1 credit ($0.009). Requires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": false,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "fixed",
        "notes": "1 credit ($0.009). Requires x402 payment."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": [
            {
              "tweetId": "string",
              "link": "string",
              "likeCount": 1,
              "repostCount": 1,
              "viewCount": 1,
              "quoteCount": 1,
              "replyCount": 1,
              "bookmarkCount": 1,
              "mentionedAt": "string",
              "type": "repost",
              "repostBreakdown": {
                "ct": 1,
                "smart": 1
              }
            }
          ],
          "metadata": {
            "pageSize": 1,
            "page": 1,
            "total": 1
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        402
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-get-trending-narratives-v2",
      "method": "GET",
      "path": "/x402/v2/data/trending-narratives",
      "docsUrl": "/api/rest/x-402-get-trending-narratives-v-2",
      "summary": "Trending narratives (5 credits total)",
      "description": "Analyze narrative trends from recent market discussions.\n\n**Cost:** 5 credits ($0.045). Requires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": false,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "fixed",
        "notes": "5 credits ($0.045). Requires x402 payment."
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "metadata": {
              "error": "string",
              "total_tweets": 1,
              "total_narratives": 1
            },
            "trending_narratives": [
              {
                "tweet_ids": [
                  "string"
                ],
                "source_links": [
                  "string"
                ],
                "narrative": "string"
              }
            ]
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        402
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-chat-v2",
      "method": "POST",
      "path": "/v2/auto/chat",
      "docsUrl": "/api/rest/auto-chat-v-2",
      "summary": "Builder Chat",
      "description": "Ask the AI to help you build an EQL query.\n\nThe response message contains the AI's reply in Markdown. When it generates EQL,\nit will be in a JSON code block that you can extract, validate, and submit.\n\nUse `sessionId` in follow-up requests to maintain conversation context.\n\n### Cost\n\nAPI mode: `1 + dynamic` credits\n- base request charge: `1` credit\n- dynamic usage charge: `ceil(request_cost * 750)` credits\n\nIn x402 mode, equivalent reference pricing remains:\n- `fast`: `5 credits` (`$0.045`)\n- `expert`: `18 credits` (`$0.162`)\n\n### Auth\n\nRequired headers:\n```http\nx-elfa-api-key: <api_key>\nx-elfa-timestamp: <unix_seconds>\nx-elfa-signature: <hex_hmac_sha256>\n```\n\nSigning payload:\n```text\ntimestamp + method + path + body\n```\n\nFor this route, sign with `path = \"/chat\"`.\n\n### Request Example\n\n```json\n{\n  \"message\": \"Alert me when BTC breaks 100k\",\n  \"speed\": \"expert\",\n  \"sessionId\": \"optional-session-id\"\n}\n```\n\n### Response Example (200)\n\n```json\n{\n  \"sessionId\": \"session-uuid\",\n  \"response\": \"I can help with that...\",\n  \"title\": \"BTC Breakout Alert\",\n  \"reasoning\": null,\n  \"planIds\": []\n}\n```\n\n> Best practice: persist `sessionId` and reuse it for follow-up prompts so\n> the model keeps context across turns.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key",
          "x-elfa-timestamp",
          "x-elfa-signature"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": true,
        "signaturePathTemplate": "/chat",
        "agentSecretRequired": false
      },
      "cost": {
        "model": "dynamic",
        "notes": "API mode: `1 + dynamic` credits - base request charge: `1` credit - dynamic usage charge: `ceil(request_cost * 750)` credits In x402 mode, equivalent reference pricing remains: - `fast`: `5 credits` (`$0.045`) - `expert`: `18 credits` (`$0.162`)"
      },
      "requestExample": {
        "message": "Build an Auto query for BTC breakout above 100k.",
        "speed": "expert"
      },
      "responseExamples": {
        "200": {
          "sessionId": "string",
          "response": "string",
          "title": "string",
          "reasoning": "string",
          "planIds": [
            "string"
          ]
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        401,
        403
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-connect-exchange-v2",
      "method": "POST",
      "path": "/v2/auto/exchanges",
      "docsUrl": "/api/rest/auto-connect-exchange-v-2",
      "summary": "Connect Exchange",
      "description": "Connect an exchange integration.\n\nRequires HMAC request signing.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key",
          "x-elfa-timestamp",
          "x-elfa-signature"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": true,
        "signaturePathTemplate": "/exchanges",
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": {
        "exchange": "hyperliquid",
        "credentialType": "api_key",
        "metadata": {
          "label": "primary-account",
          "accountId": "acc_123"
        }
      },
      "responseExamples": {
        "200": {
          "key": {}
        },
        "201": {
          "key": {}
        }
      },
      "successStatuses": [
        200,
        201
      ],
      "errorStatuses": [
        400,
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-create-query-v2",
      "method": "POST",
      "path": "/v2/auto/queries",
      "docsUrl": "/api/rest/auto-create-query-v-2",
      "summary": "Create Query",
      "description": "Create and activate a conditional query.\n\n**Allowed action types:** `webhook`, `notify`, `telegram`, `llm`.\n\n### Cost\n\nSimulation-driven estimate (reference values):\n- baseline: `5 credits` (`$0.045`)\n- fast call: `+5 credits` (`+$0.045`)\n- expert call: `+18 credits` (`+$0.162`)\n\n### Auth\n\nRequired headers:\n```http\nx-elfa-api-key: <api_key>\nx-elfa-timestamp: <unix_seconds>\nx-elfa-signature: <hex_hmac_sha256>\n```\n\nSigning payload:\n```text\ntimestamp + method + path + body\n```\n\nFor this route, sign with `path = \"/queries\"`.\n\n### Request Example\n\n```json\n{\n  \"query\": {\n    \"conditions\": {\n      \"AND\": [\n        {\n          \"source\": \"price\",\n          \"method\": \"current\",\n          \"args\": { \"symbol\": \"BTC\" },\n          \"operator\": \">\",\n          \"value\": 100000\n        }\n      ]\n    },\n    \"actions\": [\n      {\n        \"stepId\": \"step_1\",\n        \"type\": \"notify\",\n        \"params\": { \"message\": \"BTC crossed target\" }\n      }\n    ],\n    \"expiresIn\": \"24h\"\n  },\n  \"title\": \"BTC breakout alert\",\n  \"description\": \"Notify when BTC is above 100k\"\n}\n```\n\n### Response Example (201)\n\n```json\n{\n  \"queryId\": \"q_123\",\n  \"status\": \"active\",\n  \"cost\": {\n    \"credits\": 116,\n    \"price\": \"$1.045\"\n  }\n}\n```\n\n> Best practice: call validate first, then create. After creation, wire\n> notifications (`webhook`, `telegram`, or SSE) to a background runner.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key",
          "x-elfa-timestamp",
          "x-elfa-signature"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": true,
        "signaturePathTemplate": "/queries",
        "agentSecretRequired": false
      },
      "cost": {
        "model": "dynamic",
        "notes": "Simulation-driven estimate (reference values): - baseline: `5 credits` (`$0.045`) - fast call: `+5 credits` (`+$0.045`) - expert call: `+18 credits` (`+$0.162`)"
      },
      "requestExample": {
        "query": {
          "conditions": {
            "AND": [
              {
                "source": "price",
                "method": "current",
                "args": {
                  "symbol": "BTC"
                },
                "operator": ">",
                "value": 100000
              }
            ]
          },
          "actions": [
            {
              "stepId": "step_1",
              "type": "notify",
              "params": {
                "message": "BTC crossed target"
              }
            }
          ],
          "expiresIn": "24h"
        },
        "title": "BTC breakout alert",
        "description": "Notify when BTC is above 100k so I can review the breakout setup."
      },
      "responseExamples": {
        "200": {
          "key": {}
        },
        "201": {
          "key": {}
        }
      },
      "successStatuses": [
        200,
        201
      ],
      "errorStatuses": [
        400,
        401,
        403,
        422
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-upsert-query-draft-v2",
      "method": "POST",
      "path": "/v2/auto/queries/drafts",
      "docsUrl": "/api/rest/auto-upsert-query-draft-v-2",
      "summary": "Upsert Query Draft",
      "description": "Create or update a query draft.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": {
        "query": {
          "conditions": {
            "AND": [
              {
                "source": "price",
                "method": "change",
                "args": {
                  "symbol": "ETH",
                  "period": "24h"
                },
                "operator": ">=",
                "value": 5
              }
            ]
          },
          "actions": [
            {
              "stepId": "step_1",
              "type": "webhook",
              "params": {
                "url": "https://your-runner.example/auto/events"
              }
            }
          ],
          "expiresIn": "24h"
        },
        "title": "ETH momentum draft",
        "description": "Draft query to alert when ETH 24h change is at least +5%."
      },
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-convert-query-draft-v2",
      "method": "POST",
      "path": "/v2/auto/queries/drafts/{draftId}/convert",
      "docsUrl": "/api/rest/auto-convert-query-draft-v-2",
      "summary": "Convert Query Draft",
      "description": "Convert a draft into an active query.\n\nRequires HMAC request signing.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key",
          "x-elfa-timestamp",
          "x-elfa-signature"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": true,
        "signaturePathTemplate": "/queries/drafts/{draftId}/convert",
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        },
        "201": {
          "key": {}
        }
      },
      "successStatuses": [
        200,
        201
      ],
      "errorStatuses": [
        401,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-preview-query-draft-v2",
      "method": "POST",
      "path": "/v2/auto/queries/drafts/{draftId}/preview",
      "docsUrl": "/api/rest/auto-preview-query-draft-v-2",
      "summary": "Preview Query Draft",
      "description": "Preview a stored query draft.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        401,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-preview-query-v2",
      "method": "POST",
      "path": "/v2/auto/queries/preview",
      "docsUrl": "/api/rest/auto-preview-query-v-2",
      "summary": "Preview Query",
      "description": "Preview a query without creating it.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": {
        "query": {
          "conditions": {
            "AND": [
              {
                "source": "ta",
                "method": "rsi",
                "args": {
                  "symbol": "BTC",
                  "timeframe": "1h",
                  "period": 14
                },
                "operator": "<",
                "value": 30
              }
            ]
          },
          "actions": [
            {
              "stepId": "step_1",
              "type": "notify",
              "params": {
                "message": "BTC RSI oversold"
              }
            }
          ],
          "expiresIn": "24h"
        }
      },
      "responseExamples": {
        "200": {
          "key": {}
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "auto-validate-query-v2",
      "method": "POST",
      "path": "/v2/auto/queries/validate",
      "docsUrl": "/api/rest/auto-validate-query-v-2",
      "summary": "Validate Query",
      "description": "Validate EQL syntax and get a cost estimate without creating a query.\nReturns simulation-based cost details when the query is valid.\n\n### Cost\n\nFree.\n\n### Auth\n\nRequired header:\n```http\nx-elfa-api-key: <api_key>\n```\n\nHMAC signing is not required for validate.\n\n### Request Example\n\n```json\n{\n  \"query\": {\n    \"conditions\": {\n      \"AND\": [\n        {\n          \"source\": \"price\",\n          \"method\": \"current\",\n          \"args\": { \"symbol\": \"BTC\" },\n          \"operator\": \">\",\n          \"value\": 100000\n        }\n      ]\n    },\n    \"actions\": [\n      {\n        \"stepId\": \"step_1\",\n        \"type\": \"notify\",\n        \"params\": { \"message\": \"BTC crossed target\" }\n      }\n    ],\n    \"expiresIn\": \"24h\"\n  },\n  \"title\": \"BTC breakout alert\",\n  \"description\": \"Notify when BTC is above 100k so I can review the breakout setup.\"\n}\n```\n\n### Response Example (200)\n\n```json\n{\n  \"valid\": true,\n  \"errors\": [],\n  \"warnings\": [],\n  \"simulationLlmCallsEstimate\": {\n    \"conditionCallsUpperBound\": 1,\n    \"actionCallsUpperBound\": 0,\n    \"conditionCallsBySpeed\": { \"fast\": 1, \"expert\": 0 },\n    \"actionCallsBySpeed\": { \"fast\": 0, \"expert\": 0 }\n  },\n  \"estimatedCost\": {\n    \"credits\": 30,\n    \"price\": \"$0.270\"\n  }\n}\n```\n\n> Best practice: always validate before create to catch schema issues and\n> preview estimated cost.",
      "tags": [
        "v2 Auto [BETA]"
      ],
      "beta": true,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key",
          "x-elfa-timestamp",
          "x-elfa-signature"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": true,
        "signaturePathTemplate": "/queries/validate",
        "agentSecretRequired": false
      },
      "cost": {
        "model": "free",
        "notes": "Free."
      },
      "requestExample": {
        "query": {
          "conditions": {
            "AND": [
              {
                "source": "price",
                "method": "current",
                "args": {
                  "symbol": "BTC"
                },
                "operator": ">",
                "value": 100000
              }
            ]
          },
          "actions": [
            {
              "stepId": "step_1",
              "type": "notify",
              "params": {
                "message": "BTC crossed target"
              }
            }
          ],
          "expiresIn": "24h"
        },
        "title": "BTC breakout alert",
        "description": "Notify when BTC is above 100k so I can review the breakout setup."
      },
      "responseExamples": {
        "200": {
          "valid": true,
          "errors": [
            "string"
          ],
          "warnings": [
            "string"
          ]
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        401,
        403
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "chat-v2",
      "method": "POST",
      "path": "/v2/chat",
      "docsUrl": "/api/rest/chat-v-2",
      "summary": "AI chat",
      "description": "Send a message to the Elfa AI and receive a complete response.\nSuited for agents and integrations that do not support server-sent events (SSE).\n\n**Session management:** omit `sessionId` to start a new conversation.\nThe response includes a `sessionId` — pass it in subsequent requests to continue the same conversation.\n\n**Analysis types and required fields:**\n- `chat` (default) — general conversation. Requires `message`.\n- `macro` — macro market overview. `message` is optional.\n- `summary` — quick market summary. `message` is optional.\n- `tokenIntro` — token introduction. Requires `assetMetadata` with `symbol`, or `chain` + `contractAddress`.\n- `tokenAnalysis` — token trade setup analysis. Same `assetMetadata` requirements as `tokenIntro`.\n- `accountAnalysis` — Twitter/X account analysis. Requires `assetMetadata.username`.\n\n**`assetMetadata` fields (when applicable):**\n- `symbol` — token ticker symbol (e.g. `\"BTC\"`, `\"$ETH\"`)\n- `chain` — blockchain name (e.g. `\"ethereum\"`, `\"solana\"`)\n- `contractAddress` — token contract address\n- `username` — Twitter/X username for account analysis",
      "tags": [
        "v2"
      ],
      "beta": false,
      "mode": "api_key",
      "auth": {
        "headers": [
          "x-elfa-api-key"
        ],
        "securitySchemes": [
          "api_key"
        ],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "unknown",
        "notes": null
      },
      "requestExample": {
        "message": "Summarize BTC sentiment in the last 24h.",
        "analysisType": "chat",
        "speed": "expert"
      },
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "creditsConsumed": 1,
            "sessionId": "string",
            "message": "string"
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        401
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-auto-chat",
      "method": "POST",
      "path": "/x402/v2/auto/chat",
      "docsUrl": "/api/rest/x-402-auto-chat",
      "summary": "Auto Builder chat",
      "description": "Ask the AI to help you build an EQL query. It can research live market data, suggest strategies, and return ready-to-use EQL JSON.\n\nThe response message contains the AI's reply in Markdown. When it generates EQL,\nit will be in a JSON code block that you can extract, validate, and submit.\n\nUse `sessionId` in follow-up requests to maintain conversation context.\n\n**Cost:** speed based (`fast` 5 credits/$0.045, `expert` 18 credits/$0.162).\nRequires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": true,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "dynamic",
        "notes": "speed based (`fast` 5 credits/$0.045, `expert` 18 credits/$0.162)."
      },
      "requestExample": {
        "message": "Build an Auto query for ETH downside alert under 2500.",
        "speed": "fast"
      },
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "creditsConsumed": 1,
            "sessionId": "string",
            "message": "string"
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        402
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-auto-create-query",
      "method": "POST",
      "path": "/x402/v2/auto/queries",
      "docsUrl": "/api/rest/x-402-auto-create-query",
      "summary": "Create conditional query",
      "description": "Create and activate a conditional query that monitors market data and triggers actions when conditions are met.\n\n**Allowed action types:** `webhook`, `notify`, `telegram`, `llm`.\nTrade execution is not available via x402.\n\n**Cost:** Dynamic. Base fee is 5 credits ($0.045) plus simulated LLM calls:\nfast = +5 credits (+$0.045) per call, expert = +18 credits (+$0.162) per call.\nUse the validate endpoint to preview costs.\nRequires `x-elfa-agent-secret` header.\nRequires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": true,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT",
          "x-elfa-agent-secret"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": true
      },
      "cost": {
        "model": "dynamic",
        "notes": "Dynamic. Base fee is 5 credits ($0.045) plus simulated LLM calls:"
      },
      "requestExample": {
        "query": {
          "conditions": {
            "AND": [
              {
                "source": "price",
                "method": "current",
                "args": {
                  "symbol": "SOL"
                },
                "operator": ">",
                "value": 220
              }
            ]
          },
          "actions": [
            {
              "stepId": "step_1",
              "type": "telegram",
              "params": {
                "message": "SOL crossed 220"
              }
            }
          ],
          "expiresIn": "24h"
        },
        "title": "SOL breakout alert",
        "description": "Send a Telegram alert if SOL trades above 220."
      },
      "responseExamples": {
        "200": {
          "queryId": "string",
          "status": "string"
        },
        "201": {
          "queryId": "string",
          "status": "string"
        }
      },
      "successStatuses": [
        200,
        201
      ],
      "errorStatuses": [
        400,
        402,
        422
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-auto-poll-query",
      "method": "POST",
      "path": "/x402/v2/auto/queries/{queryId}",
      "docsUrl": "/api/rest/x-402-auto-poll-query",
      "summary": "Poll query status",
      "description": "Check query status and execution results.\nRequires `x-elfa-agent-secret` header.\n\n**Cost:** Free",
      "tags": [
        "x402"
      ],
      "beta": true,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT",
          "x-elfa-agent-secret"
        ],
        "securitySchemes": [],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": true
      },
      "cost": {
        "model": "free",
        "notes": "Free"
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "queryId": "string",
          "status": "string",
          "latestEvaluation": {
            "evaluatedAt": "string",
            "wouldTriggerNow": true
          },
          "executions": [
            {
              "id": "string",
              "queryId": "string",
              "type": "string",
              "status": "string",
              "createdAt": "string"
            }
          ]
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-auto-list-sessions",
      "method": "POST",
      "path": "/x402/v2/auto/queries/{queryId}/sessions",
      "docsUrl": "/api/rest/x-402-auto-list-sessions",
      "summary": "List LLM sessions",
      "description": "List LLM output sessions for a query.\nOnly relevant for queries with `actions[0].type: \"llm\"`.\nRequires `x-elfa-agent-secret` header.\n\n**Cost:** Free",
      "tags": [
        "x402"
      ],
      "beta": true,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT",
          "x-elfa-agent-secret"
        ],
        "securitySchemes": [],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": true
      },
      "cost": {
        "model": "free",
        "notes": "Free"
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "queryId": "string",
          "sessions": [
            {
              "sessionId": "string",
              "status": "string",
              "executedAt": "string"
            }
          ]
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-auto-get-session",
      "method": "POST",
      "path": "/x402/v2/auto/queries/{queryId}/sessions/{sessionId}",
      "docsUrl": "/api/rest/x-402-auto-get-session",
      "summary": "Get LLM session details",
      "description": "Get full LLM analysis output for a specific session, including conversation messages and any trade signals.\nRequires `x-elfa-agent-secret` header.\n\n**Cost:** Free",
      "tags": [
        "x402"
      ],
      "beta": true,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT",
          "x-elfa-agent-secret"
        ],
        "securitySchemes": [],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": true
      },
      "cost": {
        "model": "free",
        "notes": "Free"
      },
      "requestExample": null,
      "responseExamples": {
        "200": {
          "sessionId": "string",
          "queryId": "string",
          "title": "string",
          "analysisType": "string",
          "createdAt": "string",
          "messages": [
            {
              "query": "string",
              "response": "string",
              "status": "string",
              "analysisType": "string",
              "timestamp": "string",
              "trades": [
                {}
              ]
            }
          ]
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        404
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-auto-validate-query",
      "method": "POST",
      "path": "/x402/v2/auto/queries/validate",
      "docsUrl": "/api/rest/x-402-auto-validate-query",
      "summary": "Validate EQL query",
      "description": "Validate EQL syntax and get a cost estimate without creating a query.\nReturns a simulation-based cost estimate when the query is valid.\nRequires `x-elfa-agent-secret` header.\n\n**Cost:** Free",
      "tags": [
        "x402"
      ],
      "beta": true,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT",
          "x-elfa-agent-secret"
        ],
        "securitySchemes": [],
        "paymentRequired": false,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": true
      },
      "cost": {
        "model": "free",
        "notes": "Free"
      },
      "requestExample": {
        "query": {
          "conditions": {
            "AND": [
              {
                "source": "price",
                "method": "current",
                "args": {
                  "symbol": "ETH"
                },
                "operator": "<",
                "value": 2500
              }
            ]
          },
          "actions": [
            {
              "stepId": "step_1",
              "type": "webhook",
              "params": {
                "url": "https://your-runner.example/auto/events"
              }
            }
          ],
          "expiresIn": "24h"
        },
        "title": "ETH downside guardrail",
        "description": "Alert if ETH breaks below 2500 so risk can be reviewed quickly."
      },
      "responseExamples": {
        "200": {
          "valid": true,
          "errors": [
            "string"
          ],
          "warnings": [
            "string"
          ]
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400
      ],
      "idempotencyKey": null
    },
    {
      "operationId": "x402-chat-v2",
      "method": "POST",
      "path": "/x402/v2/chat",
      "docsUrl": "/api/rest/x-402-chat-v-2",
      "summary": "AI chat",
      "description": "Send a message to Elfa AI and receive a complete response.\n\n**Cost:** speed based (`fast` 5 credits/$0.045, `expert` 18 credits/$0.162).\nRequires x402 payment.",
      "tags": [
        "x402"
      ],
      "beta": false,
      "mode": "x402",
      "auth": {
        "headers": [
          "PAYMENT-SIGNATURE",
          "X-PAYMENT"
        ],
        "securitySchemes": [],
        "paymentRequired": true,
        "hmacRequired": false,
        "signaturePathTemplate": null,
        "agentSecretRequired": false
      },
      "cost": {
        "model": "dynamic",
        "notes": "speed based (`fast` 5 credits/$0.045, `expert` 18 credits/$0.162)."
      },
      "requestExample": {
        "message": "Give me a quick macro market summary.",
        "analysisType": "summary",
        "speed": "fast"
      },
      "responseExamples": {
        "200": {
          "success": true,
          "data": {
            "creditsConsumed": 1,
            "sessionId": "string",
            "message": "string"
          }
        }
      },
      "successStatuses": [
        200
      ],
      "errorStatuses": [
        400,
        402
      ],
      "idempotencyKey": null
    }
  ]
}
