NAME

OpenAPI::Client::OpenAI::Path::threads-thread_id-runs-run_id-cancel - Documentation for the /threads/{thread_id}/runs/{run_id}/cancel path.

DESCRIPTION

This document describes the API endpoint at /threads/{thread_id}/runs/{run_id}/cancel.

See the examples/ directory in the distribution for examples of how to use this.

POST /threads/{thread_id}/runs/{run_id}/cancel

Cancels a run that is `in_progress`.

Operation ID

cancelRun

$client->cancelRun( ... );

Parameters

  • thread_id (in path) (Required) - The ID of the thread to which this run belongs. Type: string

  • run_id (in path) (Required) - The ID of the run to cancel. Type: string

Responses

Status Code: 200

OK

Content Types:

  • application/json

    Example:

    {
       "usage" : null,
       "required_action" : {
          "submit_tool_outputs" : {
             "tool_calls" : [
                {
                   "function" : null
                }
             ]
          }
       },
       "last_error" : null,
       "incomplete_details" : null,
       "tools" : [
          null
       ]
    }

SEE ALSO

OpenAPI::Client::OpenAI::Path

COPYRIGHT AND LICENSE

Copyright (C) 2023-2025 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.