POST/completion-messages/{task_id}/stop

Stop 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.

1 parameter · 1 body field
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).

2 status codes
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_unavailable

    App unavailable, please check your app configurations.

    app_unavailable

  • invalid_param

    Arg user must be provided.

    invalid_param

Error handling

A 400 is returned: - app_unavailable : App unavailable or misconfigured.

  • invalid_param : The required user field is missing.