- 无界AI企业服务
- 无界AI企业智能客服
- 更新日志
- 公告
- API接入指南
- 作画指南
- AI专业版作画
- AI普通版作画
- AI视频生视频
- AI咒语解析
- 付费开通API
- AI化身&个性相机
- 提升作画效率
- 自定义镜像
- 用户账户
- LLM对话聊天
- 实验室
异步任务提交接口
POST
https://gate.wujieai.net/wj-open/v1/open-platform/task/task_create
自定义镜像无界AI开放服务
请求参数
Body 参数application/json
task_code
integer <int32>
必需
示例值:
524
param
string <string>
必需
示例值:
{prompt:夜幕下的赛博朋克城市,width:512,height:512,supersize_multiple:1.0,prefine_multiple:1.0}
num
integer <int32>
必需
示例值:
2
queue_priority
integer <int32>
可选
为空或为0时,只是简单的按照时间先后顺序排队
示例值:
1
callback_url
string <string>
可选
示例值:
https://www.wujieai.net/v1/task/callback
request_address
string <string>
可选
示例值:
/create
task_timeout_seconds
integer <int32>
可选
示例值:
10
expected_generate_seconds
integer <int32>
可选
示例值:
8
limit_expected_seconds
integer <int32>
可选
示例值:
180
retry_times
integer <int32>
可选
示例值:
304
schedule_param
object (ScheduleParam_request)
可选
schedule_tag
string <string>
可选
会不会被公共集群处理受busyHourTransfer影响。
示例值:
tp0or9
channel_key
string <string>
通道限制key
示例值:
ssh745
schedule_tag_busy_hour_transfer
boolean
可选
为true时,会检查scheduleTag的集群如果全忙,则会去判断公共集群是否空闲,如公共集群空闲则提交到公共集群,否则依然提交到scheduleTag的集群。
如果scheduleTag对应集群是无卡状态,那也被定为忙
示例值:
true
channel_limit_count
integer <int32>
并发通道上限数量
示例值:
15
exceeding_channel_limit_throw_ex
boolean
可选
示例值:
true
示例
{"task_code":524,"param":"{"prompt":"夜幕下的赛博朋克城市","width":512,"height":512,"supersize_multiple":1.0,"prefine_multiple":1.0}","num":2,"queue_priority":1,"callback_url":"https://www.wujieai.net/v1/task/callback","request_address":"/create","task_timeout_seconds":10,"expected_generate_seconds":8,"limit_expected_seconds":180,"retry_times":491,"schedule_param":{"schedule_tag":"whos7r","channel_key":"678fjv","schedule_tag_busy_hour_transfer":true,"channel_limit_count":564,"exceeding_channel_limit_throw_ex":true}}
示例代码
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://gate.wujieai.net/wj-open/v1/open-platform/task/task_create' \
--header 'Content-Type: application/json' \
--data-raw '{"task_code":524,"param":"{"prompt":"夜幕下的赛博朋克城市","width":512,"height":512,"supersize_multiple":1.0,"prefine_multiple":1.0}","num":2,"queue_priority":1,"callback_url":"https://www.wujieai.net/v1/task/callback","request_address":"/create","task_timeout_seconds":10,"expected_generate_seconds":8,"limit_expected_seconds":180,"retry_times":491,"schedule_param":{"schedule_tag":"whos7r","channel_key":"678fjv","schedule_tag_busy_hour_transfer":true,"channel_limit_count":564,"exceeding_channel_limit_throw_ex":true}}'
返回响应
🟢200成功
*/*
Body
code
string <string>
响应code
示例值:
200
message
string <string>
失败信息
示例值:
success
data
object (TaskCreateResult_response)
可选
task_code
integer <int32>
资源code
示例值:
523
create_result
array[object (TaskCreateResultInfo_response) {5}]
创建结果信息
示例
{
"code": "200",
"message": "success",
"data": {
"task_code": 523,
"create_result": [
{
"task_key": "EBAAF2922001F400272E850994237B66",
"task_status": "UNGENERATE",
"expected_queue_seconds": 12,
"expected_generate_seconds": 10,
"schedule_result": {
"add_to_schedule_tag_pool": true
}
}
]
}
}
修改于 2025-01-26 03:30:13