Assistant
Stop the reply being written
Records a Stop for the assistant message being produced. The turn, on whichever instance runs it, notices within about a second, aborts its gateway call, saves what completed (status error, finishReason cancelled) and, if the stream is still attached, ends it with done{finishReason:"cancelled"}. The tokens already spent are recorded but not charged. status is cancelling when the reply was running, not_running when it had already finished. 404 for a message that is not the caller's. Requires org.view_dashboard.
post/assistant/threads/{threadId}/messages/{messageId}/cancel
Path parameters
threadIdstring required
messageIdstring required
Response
The Stop is recorded (or there was nothing to stop)
Changes
Changed in 1 of the 5 revisions of this API.1
- ○
endpoint added
endpoint-added
- ○