Cancel Async Chat Stream
Cancel an active asynchronous chat stream.
This endpoint gracefully cancels an ongoing chat completion stream by:
1. Setting the cancellation token to stop the event generation loop
2. Cancelling the underlying asyncio task
3. Updating the stream status to 'cancelled'
Notes:
- Cancellation is irreversible - stream cannot be resumed
- Any active SSE connections will receive a final event and close
- Stream status will be updated to reflect cancellation
- Use DELETE endpoint to remove cancelled streams from storage
Path parameters
message_id
Message ID of the asynchronous chat stream to cancel.
Request
This endpoint expects an object.
Response
This endpoint returns an object.
message
Confirmation message for successful stream cancellation
message_id
Unique identifier of the cancelled stream
Errors
401
Unauthorized
404
Not Found
422
Unprocessable Entity

