Skip to content

Stop a generation.

POST
/api/runs/{id}/cancel
curl --request POST \
--url http://localhost:5173/api/runs/example/cancel \
--cookie authjs.session-token=<authjs.session-token>

Whatever the model had already written still comes back through the stream, as an ending rather than as nothing.

id
required
string

The run