/api/llm
POST /api/llm/generate-sql
Generate SQL from a natural language prompt.
Requires:
- LLM to be configured (Anthropic API key set in admin settings)
- At least one table reference (explicit @mention or implicit from source_sql)
- A database_id parameter
Returns generated SQL and the list of tables used for context.
post/api/llm/generate-sql
Request body
Response
Successful response