---
title: "Generate a stream of token using Server-Sent Events"
method: POST
path: "/generate_stream"
tags: ["Text Generation Inference"]
---

# Generate a stream of token using Server-Sent Events

`POST /generate_stream`

Generate a stream of token using Server-Sent Events

## Request body

- GenerateRequest — unresolved $ref

## Response `200`

Generated Text

## Other responses

- `422` — Input validation error
- `424` — Generation Error
- `429` — Model is overloaded
- `500` — Incomplete generation

## Changes

- **2023-06-05** `e35edd53eed0` — 1 info
  - added the new optional request property `parameters/decoder_input_details`
- **2023-04-18** `de34bec00da8` — 4 breaking, 5 warning, 1 info
  - the response property `details` became nullable for the status `200`
  - the `details` response's property type/format changed from `object`/`` to ``/`` for status `200`
  - removed the required property `details/finish_reason` from the response with the `200` status
  - removed the required property `details/generated_tokens` from the response with the `200` status
  - …6 more
- **2023-03-09** `7bbd67c90f87` — 1 breaking, 1 warning, 11 info
  - the response property `details/seed` became nullable for the status `200`
  - the `parameters/seed` request property's exclusiveMinimum was set to `0.00`
  - added the new optional request property `parameters/best_of`
  - added the new optional request property `parameters/truncate`
  - …9 more
- **2023-03-03** `72d7100b5e30` — 2 info
  - added the new optional request property `parameters/return_full_text`
  - added the new optional request property `parameters/watermark`
- **2023-02-24** `b1dc76c2e991` — 1 info
  - added the required property `token/special` to the response with the `200` status

[Full history](https://skmtc.dev/preemo-inc/apis/text-generation-inference/changes/generate_stream/post.md)

---

[API](https://skmtc.dev/preemo-inc/apis/text-generation-inference.md) · [All operations](https://skmtc.dev/preemo-inc/apis/text-generation-inference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/preemo-inc/text-generation-inference/revisions/12de8108e4dd/schema)
