Skip to main content
POST
取消运行

端点

认证:需要 API Key(Authorization: Bearer <API Key>)。 下达取消信号并短暂等待(最多 5 秒)执行方响应,返回当前运行对象。排队中的运行立即停止;执行中的通常在数秒内协作停止。已经写回的记录保留(partial 为 true),可以照常读取,只按已产出的记录计费。 归属门与运行详情相同:只能取消自己发起的运行。取消后用查询运行确认终态。

请求

路径参数

string
必填
运行标识。

示例请求

响应

200 成功

返回运行对象,字段与发起运行相同。 响应包在 data 字段中,其内容如下。
string
必填
—
string
—
string
—
string
—
string
—
string
—
enum
必填
取值:PENDING / QUEUED / RUNNING / SUCCEEDED / PARTIALLY_SUCCEEDED / FAILED / CANCELLED / EXPIRED。
object
—
object
—
string
—
boolean
—
boolean
true while cancellation has been requested and the run is still winding down (cooperative stop / partial-result recovery); always false in terminal states (normalized server-side), so consumers need not derive it from state
string
—
string
—
string
—
string
—
string
when the run was first claimed by a worker. Unlike started_at, which is re-stamped on every retry, this one is never rewritten, so it is the anchor for queue time: queued = first_started_at - created_at, and total wall time = finished_at - first_started_at. Deriving queue time from started_at counts the earlier attempts’ execution as queueing. Null only for runs never claimed.
string
—
object
Objective usage metering: how much the run did (kept separate from Billing; this is what evaluations compare against).
object
Billing ledger = Usage x pricing x billing_rules: how much is charged.
object
—
object[]
—
object[]
—

错误

错误响应统一为 {"error": {code, category, message, retryable}},见错误。

客户端库