---
title: "Get a streaming answer"
method: POST
path: "/chat/message/stream"
tags: ["API: Streaming Messaging"]
---

# Get a streaming answer

`POST /chat/message/stream`

This is streaming version of the endpoint for generating an answer to a message. Returns only a stream of text, so you need to provide the `messageId` created earlier in the `/chat/message/create` step.

## Request body

- GenerateExistingMessageAnswerRequest
  - `messageId` string, uuid, required — ID of the message record for which the answer should be generated. In streaming flow, it is required to create the message record in advance, since streaming returns only the answer text.
  - `options` GenerateMessageAnswerOptions
    - `responseSize` 'XS' | 'SM' | 'MD' | 'LG' | 'XL' | 'AUTO' — Indicates the preferred size of the answer. Latency will increase as you increase the size of the response. Suggested option - AUTO, it will generate an appropriate answer size relevant to the intent of the user query.
    - `autoUseFallback` boolean — Indicates if the system should proceed with its normal flow and automatically switch to a fallback answer, if the answer cannot be generated from the referenced content. Your account must have the fallback answer feature enabled to use this.
    - `gptModel` 'GPT_3_5_TURBO' | 'GPT_4' — Optional field that allows to override default GPT Model to be used instead of the one set of the channel.
    - `useInlineReferences` boolean — Indicates if the API should return inline references within the answer or if the inline references should be removed instead.
    - `customInstructionId` string, uuid — Optional field, indicating the ID of the custom instruction associated with the channel that should be used. This allows override of the one set as primary on the channel settings.
    - `inlineReferenceType` 'ID' | 'URL' — Non-Streaming route only. Indicates the preferred type of the inline reference format, when useInlineReferences = true. When selected type = ID, the footnotes are returned as [^LalSzaA]. When type = 'URL', footnotes are returned as [\^1\](url). References JSON will be updated as well to [^LalSzaA] => footnoteId = LalSzaA or [\^1\](url) => footnoteId = '1'

## Response `200`

Response containing a stream of text.

## Other responses

- `422` — Some or all of the received payload is unprocessable.
- `500` — Internal server error

---

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