---
title: "Natural Language Query"
method: POST
path: "/api/ai/query"
tags: ["AI Assistant"]
---

# Natural Language Query

`POST /api/ai/query`

## Request

- Base URL: `https://api.fiber.ac` (the document declares no server; this is the origin it was published from)
- URL: `https://api.fiber.ac/api/ai/query`
- Auth: none declared

Convert a natural language question into a safe SQL query (ClickHouse or PostgreSQL), execute it, and return both structured results and an AI-generated summary. Safety guards: SELECT/WITH only, row limit (default 500), execution timeout (default 5s), destructive keywords blocked. Body: {question: string, history?: [{role, content}, ...]}.

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fiber-ac/apis/fiber-api.md) · [All operations](https://skmtc.dev/fiber-ac/apis/fiber-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fiber-ac/apis/fiber-api/revisions/58267250d793?raw)
