post
https://api.superwise.ai/v1/datasets/nl-query
Convert a natural language request to SQL and execute it against datasets.
- query (str): Required. Plain English description of the data you want.
- dataset_ids (list[str]): Required. Dataset IDs to scope the query.
- generate_only (bool): Optional. When True, return generated SQL + sqlglot validation without executing.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Converts a plain English description of the data you want into SQL and runs it against the datasets you name. Only those datasets are included in the context sent to the model.
When to use it
Use it to explore data without writing SQL. Set generate_only to true to get the generated SQL back without running it.
Required parameters
query(body): natural language description of the data you want.dataset_ids(body): dataset IDs to scope the query. Only these datasets are included in the context sent to the model.
Optional body fields: generate_only, thumbnail_size.
Response
A successful call returns 200 OK with valid, whether the query is valid; error; data, the result rows; and sql, the generated query.
Related: Run a SQL query on datasets, List datasets, Get an image from a dataset
400Bad Request
422Unprocessable Entity