Stop running task
POST/v1/sessions/:session_id/stop
Stops the session's running task, if any; the task then ends with a task.stopped event on the session's event stream. Returns that task's task_id, or null when no task was running.
Request
Responses
- 202
- 401
- 404
- 422
- 429
- 500
Successful Response
Authentication failed: the credential is missing, malformed, expired, or revoked.
invalid_token— The access token is invalid.project_disabled— This project is not active.token_expired— The access token has expired.user_disabled— This user is not active.
The requested resource does not exist, or is not visible to the caller.
session_not_found— Session not found
A request value failed validation; the details array names each offending field.
validation_failed— The request payload failed validation.
Either too many requests (a Retry-After header says when to retry) or the billing account is out of credits (no Retry-After — top up to continue); the code field tells the two apart.
rate_limited— Too many requests. Please slow down.
An unexpected server-side error occurred.
internal— An unexpected error occurred.