---
title: "Suggest SQL query from natural language"
method: POST
path: "/workspaces/{workspace_id}/tables/{table_name}/query-suggestion"
tags: ["tables"]
---

# Suggest SQL query from natural language

`POST /workspaces/{workspace_id}/tables/{table_name}/query-suggestion`

Uses AI to generate a SQL query suggestion from a natural language question

## Path parameters

- `workspace_id` string, required
- `table_name` string, required

## Request body

- GithubComActiveloopaiDeeplakeApiInternalQuerysuggestionSuggestQueryRequest
  - `human_query` string

## Response `200`

Query suggestion

- GithubComActiveloopaiDeeplakeApiInternalQuerysuggestionSuggestQueryResponse
  - `query` string
  - `response` string

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `403` — Access denied
- `404` — Table not found
- `500` — Internal server error

---

[API](https://skmtc.net/deeplake/apis/deeplake-api.md) · [All operations](https://skmtc.net/deeplake/apis/deeplake-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeplake/deeplake-api/revisions/e16ed11d991c/schema)
