发起ComfyUI任务1-简易
POST
/task/openapi/create
请求参数
Authorization
Header 参数
Host
string
必需
示例值:
www.runninghub.cn
Body 参数application/json
apiKey
string
必需
示例值:
{{apiKey}}
workflowId
string
必需
示例值:
1904136902449209346
addMetadata
boolean
可选
示例
{
"apiKey": "{{apiKey}}",
"workflowId": "1904136902449209346"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://www.runninghub.cn/task/openapi/create' \
--header 'Host: www.runninghub.cn' \
--header 'Content-Type: application/json' \
--data-raw '{
"apiKey": "请输入自己的apiKey",
"workflowId": "1904136902449209346"
}'
返回响应
🟢200成功
application/json
Body
code
integer
可选
示例值:
0
msg
string
返回信息
示例值:
success
data
object (TaskCreateResponse)
数据
netWssUrl
string
Wss服务地址
taskId
integer <int64>
任务Id
clientId
string
可选
taskStatus
string
可选
promptTips
string
可选
示例
{
"code": 0,
"msg": "success",
"data": {
"netWssUrl": "wss://www.runninghub.cn:443/ws/c_instance?c_host=10.129.240.44&c_port=80&clientId=e825290b08ca2015b8f62f0bbdb5f5f6&workflowId=1904136902449209346&Rh-Comfy-Auth=eyJ1c2VySWQiOiJkZTBkYjZmMjU2NGM4Njk3YjA3ZGY1NWE3N2YwN2JlOSIsInNpZ25FeHBpcmUiOjE3NDM1NjQ2NTQ1NTIsInRzIjoxNzQyOTU5ODU0NTUyLCJzaWduIjoiNjVkMTVhYjA3Njg2MjJlOGM1YzJkNTc2MzQwOWFmYzkifQ%3D%3D&target=https://hbxy.runninghub.cn:11143",
"taskId": "1904737800233889793",
"clientId": "e825290b08ca2015b8f62f0bbdb5f5f6",
"taskStatus": "RUNNING",
"promptTips": "{\"result\": true, \"error\": null, \"outputs_to_execute\": [\"9\"], \"node_errors\": {}}"
}
}
修改于 2025-04-10 08:17:13