---
title: "Search Flow Classification"
method: POST
path: "/search/search-flow-classification"
tags: ["public"]
---

# Search Flow Classification

`POST /search/search-flow-classification`

Classify whether a query should be answered by search or by chat. This powers the query bar in the Onyx Search UI.

Queries longer than 200 characters are classified as a chat flow without calling an LLM. If classification fails, the endpoint falls back to `is_search_flow: false` rather than erroring.

## Request body

- SearchFlowClassificationRequest
  - `user_query` string, required — The query to classify.

## Response `200`

Successful Response

- SearchFlowClassificationResponse
  - `is_search_flow` boolean, required — True when the query looks like a search for documents, false when it should be sent to chat.

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-02** `fcb09658bc37` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/onyx-dot-app/apis/onyx-api/changes/search/search-flow-classification/post.md)

---

[API](https://skmtc.dev/onyx-dot-app/apis/onyx-api.md) · [All operations](https://skmtc.dev/onyx-dot-app/apis/onyx-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/onyx-dot-app/onyx-api/revisions/fcb09658bc37/schema)
