渠道管理/内容发布
创建发布 Flow
接口说明:创建多平台发布 flow,一次请求可生成多个单平台任务。 请求参数中资源url只接受assets.aitoearn.ai(国际版)/assets.aitoearn.cn(中国版)域名下文件url,资源url需要与接口请求地址对应。 例如:assets.aitoearn.cn请求地址需传入assets.aitoearn.cn域名下资源url,资源上传请先通过“生成上传签名 URL”接口上传文件。
POST
/
api
/
v2
/
channels
/
publish
/
flows
创建发布 Flow
curl --request POST \
--url https://aitoearn.cn/api/v2/channels/publish/flows \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"content": {
"body": "test",
"media": [
{
"url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/WZR5ZtF0t1lIQTx1_wW-_.mp4",
"metadata": {
"type": "video"
}
}
],
"cover": {
"url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/dS2sNtXUgrLfosukfpXwd.jpg",
"metadata": {
"type": "image"
}
},
"title": "test title"
},
"publishAt": "2026-06-29T09:43:42Z",
"items": {
"accountId": "KWAI_f1b6d99b9252a17314bf5724e666123f",
"platform": "KWAI",
"overrides": {
"body": "test",
"media": [
{
"url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/WZR5ZtF0t1lIQTx1_wW-_.mp4",
"metadata": {
"type": "video"
}
}
],
"cover": {
"url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/dS2sNtXUgrLfosukfpXwd.jpg",
"metadata": {
"type": "image"
}
},
"title": "test title"
}
}
}
'{
"code": 0,
"message": "请求成功",
"data": {
"flowId": "string",
"tasks": [
{
"id": "string",
"accountId": "string",
"platform": "douyin",
"status": -1,
"publishTime": "2026-07-02T12:00:00.000Z",
"platformWorkId": "string",
"workLink": "string",
"linkStatus": "pending",
"linkError": "string",
"linkMeta": {},
"errorMsg": "string"
}
]
}
}授权
AiToEarn Open Platform API Key。
请求体
application/json
跨平台共享内容
Hide child attributes
Hide child attributes
标题
正文
目标发布时间
平台发布项
Minimum array length:
1- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
Hide child attributes
Hide child attributes
平台
可用选项:
bilibili 哔哩哔哩发布选项
- Option 1
- Option 2
Hide child attributes
Hide child attributes
分区 ID
必填范围:
0 < x <= 9007199254740991是否允许转载 0-允许,1-不允许
可用选项:
0, 1 话题 ID
必填范围:
0 < x <= 9007199254740991投稿活动 ID
必填范围:
0 < x <= 90071992547409911-原创,2-转载
可用选项:
1 转载来源
账号 ID
平台覆盖内容
Hide child attributes
Hide child attributes
标题覆盖
正文覆盖
主体媒体列表覆盖
Hide child attributes
Hide child attributes
封面覆盖,传 null 表示清空封面
Hide child attributes
Hide child attributes
外部流水 ID
响应
200 - application/json
请求已被服务处理。业务是否成功以响应体 code === 0 为准。
业务状态码。0 表示成功,非 0 表示业务错误。
响应消息。
Hide child attributes
Hide child attributes
发布 Flow ID
发布任务列表
Hide child attributes
Hide child attributes
发布任务 ID
账号 ID
平台
可用选项:
douyin, xhs, wxSph, KWAI, youtube, wxGzh, bilibili, twitter, tiktok, facebook, instagram, threads, pinterest, linkedin, google_business 发布状态
可用选项:
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 发布时间
平台作品 ID
作品链接
作品链接状态
可用选项:
pending, ready, failed 作品链接获取错误
作品链接扩展信息
错误信息
请求 ID。
错误响应时间戳,Unix 毫秒。
⌘I
创建发布 Flow
curl --request POST \
--url https://aitoearn.cn/api/v2/channels/publish/flows \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"content": {
"body": "test",
"media": [
{
"url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/WZR5ZtF0t1lIQTx1_wW-_.mp4",
"metadata": {
"type": "video"
}
}
],
"cover": {
"url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/dS2sNtXUgrLfosukfpXwd.jpg",
"metadata": {
"type": "image"
}
},
"title": "test title"
},
"publishAt": "2026-06-29T09:43:42Z",
"items": {
"accountId": "KWAI_f1b6d99b9252a17314bf5724e666123f",
"platform": "KWAI",
"overrides": {
"body": "test",
"media": [
{
"url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/WZR5ZtF0t1lIQTx1_wW-_.mp4",
"metadata": {
"type": "video"
}
}
],
"cover": {
"url": "https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/dS2sNtXUgrLfosukfpXwd.jpg",
"metadata": {
"type": "image"
}
},
"title": "test title"
}
}
}
'{
"code": 0,
"message": "请求成功",
"data": {
"flowId": "string",
"tasks": [
{
"id": "string",
"accountId": "string",
"platform": "douyin",
"status": -1,
"publishTime": "2026-07-02T12:00:00.000Z",
"platformWorkId": "string",
"workLink": "string",
"linkStatus": "pending",
"linkError": "string",
"linkMeta": {},
"errorMsg": "string"
}
]
}
}
