跳转到主要内容
POST
/
workflows
/
run
A valid request URL is required to generate request examples
{
  "workflow_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "running",
    "created_at": 123,
    "finished_at": 123,
    "outputs": {},
    "error": "<string>",
    "elapsed_time": 123,
    "total_tokens": 123,
    "total_steps": 0
  }
}

授权

Authorization
string
header
必填

API 密钥认证。

请求体

application/json
inputs
object
必填

工作流变量的键/值对。文件数组类型变量的值应为 InputFileObjectWorkflow 列表。

示例:
{
  "user_query": "Translate this for me.",
  "target_language": "French"
}
response_mode
enum<string>
必填

响应模式。Cloudflare 阻塞模式超时时间为 100 秒。

可用选项:
streaming,
blocking
user
string
必填

用户标识符。

响应

工作流执行成功。返回结构取决于 response_mode

  • blocking:返回 application/json 格式的 WorkflowCompletionResponse
  • streaming:返回 text/event-stream 格式的 ChunkWorkflowEvent 流。

阻塞模式工作流执行的响应。

workflow_run_id
string<uuid>
task_id
string<uuid>
data
object