---
title: "Stop a preview that is being written"
method: POST
path: "/sequences/{sequence_id}/agent/preview/{preview_id}/stop/"
tags: ["sequences"]
---

# Stop a preview that is being written

`POST /sequences/{sequence_id}/agent/preview/{preview_id}/stop/`

## 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/sequences/{sequence_id}/agent/preview/{preview_id}/stop/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Ask the preview streaming under `preview_id` (its first frame) to stop. Cooperative: the preview checks before each model call and while the model writes, and ends there, its stream closing on an `error` frame with reason `stopped`. A preview that has already finished is unaffected.

## Path parameters

- `sequence_id` string, uuid, required
- `preview_id` string, uuid, required

## Response `202`

Successful Response

- SequenceAgentPreviewStopResponseSchema: A Stop was asked for. Whether it lands is the stream's to say. The request is cooperative and best effort: the preview reads it before each model call and while the model writes, and a preview that has already finished is not affected. The stream reports a Stop that landed as an `error` frame with reason `stopped`.
  - `preview_id` string, uuid, required

## 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/4a6bd71e3f02?raw)
