---
title: "Stop an agent draft that is being generated"
method: POST
path: "/table-enrichments/saved-agents/generate/{generation_id}/stop/"
tags: ["table-enrichments"]
---

# Stop an agent draft that is being generated

`POST /table-enrichments/saved-agents/generate/{generation_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/table-enrichments/saved-agents/generate/{generation_id}/stop/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Ask the build streaming under `generation_id` (its first frame) to stop. Cooperative: the build reads the request once a second while the model writes and again before each model call, and ends there, its trail on the last step and its stream in an `error` frame with reason `stopped`. A build that has already finished is unaffected. The turn a stopped build claimed is given back.

## Path parameters

- `generation_id` string, uuid, required

## Response `202`

Successful Response

- SavedAgentGenerationStopResponseSchema: A Stop was asked for. Whether it lands is the stream's to say. The flag is cooperative and best effort: the build reads it before its next model call, and a build that has already finished is not affected. The stream reports the outcome as an `error` frame with reason `stopped`.
  - `generation_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)
