---
title: "Generate a reply draft, streaming the work"
method: POST
path: "/inbox-ai/threads/{thread_id}/draft/stream/"
tags: ["inbox-ai"]
---

# Generate a reply draft, streaming the work

`POST /inbox-ai/threads/{thread_id}/draft/stream/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/inbox-ai/threads/{thread_id}/draft/stream/`
- Auth: HTTP bearer

Draft with AI as a stream of Server-Sent Events. Writes exactly the reply the plain draft route writes, and says what it did on the way: a `step` frame for each piece of work once it is done (reading the conversation, reading the contact's LinkedIn profile when the conversation's agent does, writing the reply), each with its measured duration, then one `result` frame whose `data` is the draft, or null when nothing usable was written.

Failures arrive as an `error` frame, because the stream has already answered 200: reason `not_found` when the conversation is gone, `limit` when the workspace has used today's AI Assistant allowance, `paused` when the AI Assistant is paused, and no reason for anything else, including a sequence with no audience table, whose sentence says so.

Closing the connection does not stop the draft: it is still written and saved.

## Path parameters

- `thread_id` string, uuid, required

## Request body

- GenerateDraftSchema
  - `steer_text` string, nullable

## Response `200`

A stream of Server-Sent Events; the final `result` frame's `data` is the draft, or null.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/dc5ac3c84444?raw)
