---
title: "Send a chat message"
method: POST
path: "/api/v1/chat"
---

# Send a chat message

`POST /api/v1/chat`

Send a message to Deeptrace and receive an AI response. Supports multi-turn conversations via ``chat_id``. Set ``stream=true`` for Server-Sent Events streaming.

## Query parameters

- `stream` boolean — Enable SSE streaming

## Request body

- ChatRequest — Request body for ``POST /api/v1/chat``.
  - `messages` ChatMessage[], required
    - `role` string, required
    - `content` string, required
  - `chat_id` string, nullable
  - `model` string, nullable
  - `system_prompt` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/deeptrace/apis/fastapi.md) · [All operations](https://skmtc.net/deeptrace/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeptrace/fastapi/versions/2e2a6de8aeda/schema)
