OpenAIOpenAI API
POST/threads/{thread_id}/runs/{run_id}/cancel
管理cancel Run。
OpenAI API 中用于 cancel Run 的保留合约 POST Endpoint。模型与资源相关值由调用方在运行时提供。
覆盖固定 MIT 许可官方 revision 中全部 288 个 OpenAI Platform REST Endpoint(含类型化 SSE 流式与 Realtime 调用管理)。Hub 提供文档与独立 SDK/CLI,但不代理模型、账户或用量数据;调用方通过本地 API key 直连。
请求
- operationId
cancelRun- 服务器
https://api.openai.com/v1- 认证
- ApiKeyAuth, AdminApiKeyAuth
请求参数
thread_id
pathstring必填
OpenAI API 合约中的 thread id 值。
run_id
pathstring必填
OpenAI API 合约中的 run id 值。
响应
200
RunObjectapplication/json
供应商成功响应。
字段: assistant_idcancelled_atcompleted_atcreated_atexpires_atfailed_atidincomplete_detailsinstructionslast_errormax_completion_tokensmax_prompt_tokensmetadatamodelobjectparallel_tool_callsrequired_actionresponse_formatstarted_atstatustemperaturethread_idtool_choicetoolstop_ptruncation_strategyusage
429
ErrorResponseapplication/json
供应商返回 HTTP 状态 429。
字段: error
{
"cancelled_at": 0,
"completed_at": 0,
"created_at": 0,
"expires_at": 0,
"failed_at": 0,
"incomplete_details": {
"reason": "max_completion_tokens"
}
}