Skip to main content

Builder Chat

POST 

/v2/auto/chat

Ask the AI to help you build an EQL query.

The response message contains the AI's reply in Markdown. When it generates EQL, it will be in a JSON code block that you can extract, validate, and submit.

Use sessionId in follow-up requests to maintain conversation context.

Cost

Usage cost depends on your Auto plan and billing model. In x402 mode, equivalent reference pricing is:

  • fast: $0.225
  • expert (default): $1.00

Auth

Required headers:

x-elfa-api-key: <api_key>
x-elfa-timestamp: <unix_seconds>
x-elfa-signature: <hex_hmac_sha256>

Signing payload:

timestamp + method + path + body

For this route, sign with path = "/chat".

Request Example

{
"message": "Alert me when BTC breaks 100k",
"speed": "expert",
"sessionId": "optional-session-id"
}

Response Example (200)

{
"sessionId": "session-uuid",
"response": "I can help with that...",
"title": "BTC Breakout Alert",
"reasoning": null,
"planIds": []
}

Best practice: persist sessionId and reuse it for follow-up prompts so the model keeps context across turns.

Request

Responses

Ok