---
title: "Chat"
method: POST
path: "/api/chat"
tags: ["Chat"]
---

# Chat

`POST /api/chat`

## Request

- Base URL: `https://api.xfinlab.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xfinlab.com/api/chat`
- Auth: none declared

XFINLAB AI 投資助手 chat endpoint.

Previously proxied to Dify (services/dify_service.py). Now uses the same
ai/ai_router.py provider (Groq by default) already trusted elsewhere in
the codebase (e.g. chart_analysis.py) — no external Dify account needed.
Request/response shape is unchanged, so the frontend (chat.html) needs
no changes.

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xfinlab/apis/xfinlab-api.md) · [All operations](https://skmtc.dev/xfinlab/apis/xfinlab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xfinlab/apis/xfinlab-api/revisions/205f85614bc6?raw)
