---
title: "Stop Completion Message Generation"
method: POST
path: "/completion-messages/{task_id}/stop"
tags: ["Completion Messages"]
---

# Stop Completion Message Generation

`POST /completion-messages/{task_id}/stop`

**Available for**: Text Generator apps.

Stops a completion message generation task. Only supported in `streaming` mode.

## Path parameters

- `task_id` string, required

## Request body

- object
  - `user` string, required — End-user identifier, defined by your app and unique within it. Must match the `user` sent with the original message; if it differs, the stop silently does nothing and still returns success. See [End User Identity](/en/api-reference/guides/end-user-identity).

## Response `200`

Operation successful.

- object
  - `result` string — Operation result. Always `success`.

## Other responses

- `400` — - `app_unavailable` : App unavailable or misconfigured. - `invalid_param` : The required `user` field is missing.

---

[API](https://skmtc.net/langgenius/apis/dify-service-api.md) · [All operations](https://skmtc.net/langgenius/apis/dify-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/langgenius/dify-service-api/revisions/e49b3db72bad/schema)
