---
title: "Stream AI chat response"
method: POST
path: "/ai/chat/stream"
tags: ["ai"]
---

# Stream AI chat response

`POST /ai/chat/stream`

Stream AI chat response using OpenAI

## Request body

- object
  - `messages` object[], required
    - `role` union, required
      - 'user'
      - 'assistant'
      - 'system'
    - `content` string, required
  - `model` string

## Response `200`

Streaming text response

- string — Streaming text response

## Other responses

- `400` — Default Response
- `500` — Default Response

## Changes

- **2026-01-15** `c4ddc6be4535` — 4 breaking, 1 info
  - removed the enum value `assistant` of the request property `messages/items/role`
  - removed the enum value `system` of the request property `messages/items/role`
  - removed the enum value `user` of the request property `messages/items/role`
  - the `messages/items/role` request property type changed from `string` to no type
  - …1 more
- **2026-01-15** `8e8d1be8bbf2` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/blockmatic/apis/basilic-api/changes/ai/chat/stream/post.md)

---

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