流动流动

run()

workflow.run({ input }) → Promise<WorkflowRun>

启动运行并立即返回。运行在平台上继续,无论您的进程是否运行。

returns at onceinput feeds the templatessurvives your process
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

const run = await workflow.run({ input: { since: "2026-10-01", channel: "ops" } });

console.log(run.id, run.data.status);   // "running"
run = workflow.run(input={"since": "2026-10-01", "channel": "ops"})

print(run.id, run.data["status"])   # "running"
inputobject{}

进进 {{input.…}} 模板。任何您喜欢的形状。

等待不等待

跑步开始并交还 跟着它,打电话给 等待(),或者保留识别特征,然后把它捡起来 raun().

const run = await workflow.run({ input });
await run.wait();                      // until it finishes, or waits for a human

if (run.data.status === "waiting") {
  const step = run.data.steps.find((s) => s.status === "waiting");
  await run.resume(step.id, { approved: true });
}
run = workflow.run(input=payload)
run.wait()                     # until it finishes, or waits for a human

if run.data["status"] == "waiting":
    step = next(s for s in run.data["steps"] if s["status"] == "waiting")
    run.resume(step["id"], {"approved": True})

输入是运行唯一需要的

其它一切都在定义中

流程保存时,模型、 存储器、 提示和地址会固定。 这就是问题所在: 无人观看的运行在启动时不能被告知要做不同的事情 。

运行开始其他方式

触发触发开始于
manual此项呼吁的本呼吁
cron时间表
webhook一项内容外请求
mail发送信息

四人生产同样的运行, input 由从它开始的任何东西填充 。

多少运行成本

无论步骤成本如何—— 示范电话、搜索、取回、转换、媒体。 每一步都报告自己的信用额,运行量也包含总金额。