v1
latestOpenAPI 3.1.02026-07-1730321418.0 KBText-to-SQL Context (NSQL)
Return the same context block that /v1/nsql injects into the configured NSQL model.
The response is a markdown/plain-text block or JSON object containing the in-scope datasets, schemas, Spice-specific SQL functions, registered user-defined functions, relevant JSON/Spark compatibility functions, and optional sample data.
Query parameters
The name of the model whose dataset allowlist should be used. If omitted, Spice defaults to the only compatible LLM model configured in the Spicepod.
Whether distinct-value samples are included in the context block. Also accepts sample_data_enabled for compatibility with /v1/nsql request bodies. Default: false.
Maximum number of rows per distinct-value sample. Default: 3, maximum: 100.
Whether example rows are included in the context block. Defaults to include_sampling when omitted, matching /v1/nsql sample_data_enabled behavior.
Maximum number of example rows per dataset. Default: 3, maximum: 100.
Names of datasets to include in the context block. If omitted, all datasets visible to the selected model are included.
Headers
The format of the response, one of 'text/markdown' (default), 'text/plain', or 'application/json'.
Response
NSQL context block