获取AI创作任务列表
说明
分页查询 AI 创作任务列表,支持按创作类型、任务唯一 ID、是否成功进行筛选。
请求地址
http
POST /open/v1/ai_creation/task/pageHeader
http
access_token: {{access_token}}
Content-Type: application/json请求参数 Body
json
{
"unique_ids": [],
"type": 3,
"page": 1,
"page_size": 50,
"is_success": false
}参数说明
| 字段 | 类型 | 是否必传 | 示例 | 说明 |
|---|---|---|---|---|
| unique_ids | array<string> | 否 | ["a60747d7-dc05-4afc-b2ef-ee4370ed53c6"] | 创作任务唯一 ID 列表,传空数组表示不过滤,最大数量50 |
| type | int | 是 | 3 | 创作类型,图片生成为 3,视频生成4 |
| page | int | 是 | 1 | 页码,从 1 开始 |
| page_size | int | 是 | 50 | 每页数量,最大50 |
| is_success | bool | 否 | false | 是否仅查询成功任务,true 仅成功,false 查询全部 |
响应示例
json
{
"trace_id": "a55f1ab65ad856106463d85cf24b2eb9",
"code": 0,
"msg": "success",
"data": {
"list": [
{
"id": 7,
"unique_id": "58b1c892-6e40-48f9-b06f-50bdd800d3d0",
"create_time": 1772510584,
"number_ai_creation": 1,
"type": 3,
"progress_desc": "Error",
"err_msg": "任务失败,本次生成不消耗蝉豆",
"aspect_ratio": "9:16",
"output_url": [],
"photo_info": {
"ref_img_url": [
"https://www.chanjing.cc/chanjing/res/aigc_creation/open/photo/2026-03-02/f794a528f749aa652fa327c83e49306b.jpg"
],
"ref_prompt": "生成一张微缩模型风格的创意场景图。",
"clarity": 4096,
"aspect_ratio": "9:16",
"quality_mode": "",
"number_of_images": 1
},
"motion_info": {
"photo_path_url": null,
"ref_prompt": "",
"clarity": 0,
"quality_mode": "",
"style": "",
"aspect_ratio": "",
"video_duration": 0
},
"ref_img_url": [
"https://www.chanjing.cc/chanjing/res/aigc_creation/open/photo/2026-03-02/f794a528f749aa652fa327c83e49306b.jpg"
],
"model_code": "doubao-seedream-4.5",
"model_name": ""
}
],
"total": 7,
"page_info": {
"page": 1,
"size": 50,
"total_count": 7,
"total_page": 1
}
}
}响应字段说明
| 一级字段 | 二级字段 | 三级字段 | 四级字段 | 说明 |
|---|---|---|---|---|
| code | 响应状态码 | |||
| msg | 响应信息 | |||
| trace_id | 请求链路追踪 ID | |||
| data | 响应数据 | |||
| list | 任务列表数据 | |||
| id | 任务自增 ID | |||
| unique_id | 创作任务唯一 ID | |||
| create_time | 任务创建10位时间戳 | |||
| number_ai_creation | 本次生成数量 | |||
| type | 创作类型(3 图片,4 视频) | |||
| progress_desc | 任务状态描述(如Queued:排队中,Ready:入队等待,Generating:生成中,Success:成功,Error:失败) | |||
| err_msg | 失败原因 | |||
| aspect_ratio | 输出比例 | |||
| output_url | 生成结果地址列表 | |||
| photo_info | 图片创作参数信息 | |||
| ref_img_url | 图片创作参考图 URL 列表 | |||
| ref_prompt | 图片创作提示词 | |||
| clarity | 图片清晰度 | |||
| aspect_ratio | 图片比例,1:1、3:4、4:3、9:16、16:9 | |||
| quality_mode | 质量模式,std:极速版;pro:专业版 | |||
| number_of_images | 图片生成数量 | |||
| motion_info | 视频创作参数信息 | |||
| photo_path_url | 视频参考图/路径地址 | |||
| ref_prompt | 视频创作提示词 | |||
| clarity | 视频清晰度 768、1080、1024、2048、4096 | |||
| quality_mode | 视频质量模式,std:标准;pro:高品质 | |||
| style | 视频风格 | |||
| aspect_ratio | 视频比例,1:1、3:4、4:3、9:16、16:9 | |||
| video_duration | 视频时长(秒) | |||
| ref_img_url | 顶层参考图 URL 列表 | |||
| model_code | 模型编码 | |||
| model_name | 模型名称 | |||
| total | 当前查询总数 | |||
| page_info | 分页信息 | |||
| page | 当前页码 | |||
| size | 页面大小 | |||
| total_count | 总记录数 | |||
| total_page | 总页数 |
响应状态码说明
| code | 说明 |
|---|---|
| 0 | 响应成功 |
| 400 | 传入参数格式错误 |
| 10400 | AccessToken 验证失败 |
| 40000 | 参数错误 |
| 40001 | 超出 QPS 限制 |
| 50000 | 系统内部错误 |
示例代码
shell
curl --location --request POST 'https://www.chanjing.cc/open/v1/ai_creation/task/page' \
--header 'access_token: {{access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"unique_ids": [],
"type": 3,
"page": 1,
"page_size": 50,
"is_success": false
}'go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "https://www.chanjing.cc/open/v1/ai_creation/task/page"
method := "POST"
payload := strings.NewReader(`{
"unique_ids": [],
"type": 3,
"page": 1,
"page_size": 50,
"is_success": false
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("access_token", "{{access_token}}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}java
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"unique_ids\": [],\n \"type\": 3,\n \"page\": 1,\n \"page_size\": 50,\n \"is_success\": false\n}");
Request request = new Request.Builder()
.url("https://www.chanjing.cc/open/v1/ai_creation/task/page")
.method("POST", body)
.addHeader("access_token", "{{access_token}}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();py
import requests
import json
url = "https://www.chanjing.cc/open/v1/ai_creation/task/page"
payload = json.dumps({
"unique_ids": [],
"type": 3,
"page": 1,
"page_size": 50,
"is_success": False
})
headers = {
'access_token': '{{access_token}}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)