Create Publish Flow
Interface description: Create a multi-platform publishing flow, and one request can generate multiple single-platform tasks.
Before calling this interface, please make sure you understand the complete publishing process and click Learn the complete publishing process.
Tip: Except for X/Twitter (Twitter) publishing, publishing on other platforms is currently free; for X/Twitter publishing billing, please click to view.
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"
}
}
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/publish/flows"
payload = {
"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"
}
}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: {
body: JSON.stringify('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: JSON.stringify('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'
}
}
})
};
fetch('https://aitoearn.cn/api/v2/channels/publish/flows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/publish/flows"
payload := strings.NewReader("{\n \"content\": {\n \"body\": \"test\",\n \"media\": [\n {\n \"url\": \"https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/WZR5ZtF0t1lIQTx1_wW-_.mp4\",\n \"metadata\": {\n \"type\": \"video\"\n }\n }\n ],\n \"cover\": {\n \"url\": \"https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/dS2sNtXUgrLfosukfpXwd.jpg\",\n \"metadata\": {\n \"type\": \"image\"\n }\n },\n \"title\": \"test title\"\n },\n \"publishAt\": \"2026-06-29T09:43:42Z\",\n \"items\": {\n \"accountId\": \"KWAI_f1b6d99b9252a17314bf5724e666123f\",\n \"platform\": \"KWAI\",\n \"overrides\": {\n \"body\": \"test\",\n \"media\": [\n {\n \"url\": \"https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/WZR5ZtF0t1lIQTx1_wW-_.mp4\",\n \"metadata\": {\n \"type\": \"video\"\n }\n }\n ],\n \"cover\": {\n \"url\": \"https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/dS2sNtXUgrLfosukfpXwd.jpg\",\n \"metadata\": {\n \"type\": \"image\"\n }\n },\n \"title\": \"test title\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "Request succeeded",
"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"
}
]
}
}Authorizations
Need to get API Key from AiToEarn. Click to go to "API Key Obtaining Tutorial".
Body
Share content across platforms
Hide child attributes
Hide child attributes
title
text
Main media list
Hide child attributes
Hide child attributes
Media URL
cover
Hide child attributes
Hide child attributes
Cover URL
Target release time
Platform release items
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
platform
bilibili Bilibili publishing options
- Option 1
- Option 2
Hide child attributes
Hide child attributes
Partition ID
0 < x <= 9007199254740991Whether to allow reprinting 0-allowed, 1-not allowed
0, 1 Topic ID
0 < x <= 9007199254740991Submission activity ID
0 < x <= 90071992547409911-original, 2-reprinted
1 Reprint source
Account ID
Platform coverage
Hide child attributes
Hide child attributes
title override
Text coverage
Main media list coverage
Hide child attributes
Hide child attributes
Media URL
Cover coverage, passing null means clearing the cover
Hide child attributes
Hide child attributes
Cover URL
External flow ID
Response
The request has been processed by the service. Business success is determined by whether the response body has code === 0.
Business status code. 0 means success; non-zero means a business error.
Response message.
Hide child attributes
Hide child attributes
Post Flow ID
Post a task list
Hide child attributes
Hide child attributes
Post task ID
Account ID
platform
douyin, xhs, wxSph, KWAI, youtube, wxGzh, bilibili, twitter, tiktok, facebook, instagram, threads, pinterest, linkedin, google_business Release status
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Release time
Platform work ID
Work link
Work link status
pending, ready, failed Error getting link to work
Work link extension information
error message
Request ID.
Error response timestamp in Unix milliseconds.
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"
}
}
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/publish/flows"
payload = {
"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"
}
}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: {
body: JSON.stringify('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: JSON.stringify('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'
}
}
})
};
fetch('https://aitoearn.cn/api/v2/channels/publish/flows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/publish/flows"
payload := strings.NewReader("{\n \"content\": {\n \"body\": \"test\",\n \"media\": [\n {\n \"url\": \"https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/WZR5ZtF0t1lIQTx1_wW-_.mp4\",\n \"metadata\": {\n \"type\": \"video\"\n }\n }\n ],\n \"cover\": {\n \"url\": \"https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/dS2sNtXUgrLfosukfpXwd.jpg\",\n \"metadata\": {\n \"type\": \"image\"\n }\n },\n \"title\": \"test title\"\n },\n \"publishAt\": \"2026-06-29T09:43:42Z\",\n \"items\": {\n \"accountId\": \"KWAI_f1b6d99b9252a17314bf5724e666123f\",\n \"platform\": \"KWAI\",\n \"overrides\": {\n \"body\": \"test\",\n \"media\": [\n {\n \"url\": \"https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/WZR5ZtF0t1lIQTx1_wW-_.mp4\",\n \"metadata\": {\n \"type\": \"video\"\n }\n }\n ],\n \"cover\": {\n \"url\": \"https://assets.aitoearn.cn/69a5882a0ae8abf6b443675f/user/media/202606/dS2sNtXUgrLfosukfpXwd.jpg\",\n \"metadata\": {\n \"type\": \"image\"\n }\n },\n \"title\": \"test title\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "Request succeeded",
"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"
}
]
}
}
