POST
/completion-messages/{task_id}/stopStop Completion Message Generation
Available for: Text Generator apps.
Stops a completion message generation task. Only supported in streaming mode.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
task_idstringrequired
Task ID, from the streaming events of [Send Completion Message](/en/api-reference/completion-messages/send-completion-message).
userstringrequired
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).
200Operation successful.
resultstringoptional
Operation result. Always `success`.
400- `app_unavailable` : App unavailable or misconfigured.
- `invalid_param` : The required `user` field is missing.
2 documented failures
app_unavailableApp unavailable, please check your app configurations.
app_unavailable
invalid_paramArg user must be provided.
invalid_param
Error handling
A 400 is returned: - app_unavailable : App unavailable or misconfigured.
invalid_param: The requireduserfield is missing.