Skip to main content
POST
Lint and auto-complete a SemQL query

Body

application/json
query
string
required

Raw SemQL text to lint and auto-complete.

cursor
integer

Byte offset in the query where auto-complete context is evaluated. When omitted, defaults to the end of the query.

An explicit 0 is honoured as written and returns start-of-query completions — it is not treated as "omitted". An offset past the end of the query, or a negative one, returns 400 invalid_request.

Required range: x >= 0

Response

Lint diagnostics and completions.

valid
boolean

True when the query has no diagnostics.

normalized
string

Canonical SemQL text form (empty when invalid).

diagnostics
object[]

Parse and validation errors found in the query.

completions
object[]

Valid next tokens at the cursor position.