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

# Send a chat message

`POST /api/v1/chat`

## Request

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

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.dev/deeptrace/apis/deeptrace-api.md) - [All operations](https://skmtc.dev/deeptrace/apis/deeptrace-api/llms.txt) - [OpenAPI document](https://skmtc.dev/deeptrace/apis/deeptrace-api/revisions/855e59bb07f0?raw)
