generate_sql
Translate a natural-language request into a SQL statement. Returns JSON { sql } containing the query text and nothing else — no validation report, no complexity score, and the query is never executed or checked against a real database. It has no knowledge of your schema beyond what the request states, so table and column names are guesses unless you supply them. Review before running, especially anything that writes. Paid model call. Anonymous callers get 3 per hour per IP and are then refused with 401; signed-in callers get 15 per minute per IP. Capped at roughly 500 tokens. Answers are cached, so the same request returns the same query.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dialect | No | Intended SQL dialect. Accepted for forward compatibility but NOT currently passed to the model, so the generated SQL is generic and may need adjusting for your engine. | |
| description | Yes | What the query should do, in plain language. Include the table and column names you want used, otherwise the model invents plausible ones. Required and must not be blank. |