---
title: "Send chat message (SSE)"
method: POST
path: "/api/v1/chat"
tags: ["Open API"]
---

# Send chat message (SSE)

`POST /api/v1/chat`

Send message to AstrBot chat pipeline and receive streaming SSE response. Reuses /api/chat/send behavior. If session_id/conversation_id is omitted, server will create a new UUID session_id.

## Request body

- ChatSendRequest
  - `message` union, required
    - string
    - MessagePart[]
      - `type` 'plain' | 'reply' | 'image' | 'record' | 'file' | 'video', required
      - `text` string
      - `message_id` union
        - string
        - integer
      - `selected_text` string
      - `attachment_id` string
      - `filename` string
      - `path` string
  - `session_id` string — Optional chat session ID. If omitted (and conversation_id is also omitted), server creates a UUID automatically.
  - `conversation_id` string — Alias of session_id.
  - `username` string, required — Target username.
  - `selected_provider` string
  - `selected_model` string
  - `enable_streaming` boolean
  - `config_id` string — Optional AstrBot config file ID. If provided, the chat session will use this config file. Use "default" to reset to default config.
  - `config_name` string — Optional AstrBot config file name. Used only when config_id is not provided.

## Response `200`

SSE stream

## Other responses

- `401` — Unauthorized
- `403` — Forbidden

## Changes

- **2026-03-09** `3d43cee2622a` — 4 breaking, 6 warning, 10 info
  - the request property `username` became required
  - removed the enum value `audio` of the request property `message/oneOf[subschema #2]/items/type`
  - removed the enum value `text` of the request property `message/oneOf[subschema #2]/items/type`
  - removed the media type `application/json` for the response with the status `200`
  - …16 more

[Change history](https://skmtc.dev/astrbotdevs/apis/astrbot-openapi-v1/changes/api/v1/chat/post.md)

---

[API](https://skmtc.dev/astrbotdevs/apis/astrbot-openapi-v1.md) · [All operations](https://skmtc.dev/astrbotdevs/apis/astrbot-openapi-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/astrbotdevs/astrbot-openapi-v1/revisions/3d43cee2622a/schema)
