Text-to-SQL API
Generate and run SQL from a natural language question
Generate and run SQL
Headers
Header
Type
Description
Body
Field
Type
Default
Description
curl -X POST https://<app-cname>.spiceai.io/v1/nsql \
-H "X-API-Key: <app-api-key>" \
-H "Content-Type: application/json" \
-d '{
"query": "How many taxi trips were there last month?",
"sample_data_enabled": true
}'Get the SQL generation context
Headers
Header
Type
Description
Query parameters
Parameter
Type
Default
Description
Response
Field
Description
In the Portal
Last updated
Was this helpful?