Validate Query
POST/v2/auto/queries/validate
Validate EQL syntax and get a cost estimate without creating a query. Returns simulation-based cost details when the query is valid.
Cost
Free.
Auth
Required header:
x-elfa-api-key: <api_key>
HMAC signing is not required for validate.
Request Example
{
"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"
}
}
Response Example (200)
{
"valid": true,
"errors": [],
"warnings": [],
"simulationLlmCallsEstimate": {
"conditionCallsUpperBound": 1,
"actionCallsUpperBound": 0,
"conditionCallsBySpeed": { "fast": 1, "expert": 0 },
"actionCallsBySpeed": { "fast": 0, "expert": 0 }
},
"estimatedCost": {
"credits": 30,
"price": "$0.270"
}
}
Best practice: always validate before create to catch schema issues and preview estimated cost.
Request
Responses
- 200
- 400
- 401
- 403
Ok
Missing or invalid parameters
Missing or invalid API key
Auto is not enabled for this API key