generate_sql

Converts a natural language question into a SQL query

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

The project ID to scope the operation to

string
required

The natural language question to convert to SQL

string

Optional thread ID to maintain conversation context

string

Optional language override for AI responses. If not provided, will use the project's default language. Affects error messages and explanation responses. The format is not strictly enforced, but it is recommended to follow the language list in RFC 5646 (check https://gist.github.com/msikma/8912e62ed866778ff8cd for reference).

boolean
Defaults to false

Whether to return the SQL dialect in the response. If true, the SQL returned will be in the dialect of the database.

boolean
Defaults to false

Whether to return both Wren SQL and dialect SQL in the response. If true, response includes both 'sql' (Wren SQL) and 'dialectSql' (database-specific SQL) fields.

Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json