---
title: "Translate a natural-language question into read-only Cypher"
method: POST
path: "/api/nlq"
---

# Translate a natural-language question into read-only Cypher

`POST /api/nlq`

Translate a natural-language question into a read-only OpenCypher query using
a configured LLM provider. NLQ must be enabled via environment
(`NLQ_MODEL`, `OPENAI_API_KEY`, optional `NLQ_API_BASE_URL`). Returns the
generated Cypher only; execute it with `/api/query`.

## Request body

- object
  - `question` string, required — The natural-language question to translate.

## Response `200`

Cypher generated successfully

- object
  - `cypher` string

## Other responses

- `400` — NLQ disabled or generation error

## Changes

- **2026-08-22** `0caaf08c2f95` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/samyama-ai/apis/samyama-graph-database-api/changes/api/nlq/post.md)

---

[API](https://skmtc.dev/samyama-ai/apis/samyama-graph-database-api.md) · [All operations](https://skmtc.dev/samyama-ai/apis/samyama-graph-database-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/samyama-ai/samyama-graph-database-api/revisions/7f3d37bbc2cd/schema)
