目标账号只找一次,之后想排多少就排多少。
已连接账号在 API 里是只读的:它们只在后台连接一次,因为 OAuth 凭据绝不能离开服务器。列出它们,记住 id。
export AUTOSTUD_API_KEY="sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Read-only on purpose: accounts are connected from the dashboard,
# so the OAuth tokens never leave the server.
curl "https://autostud.ai/api/v1/social_accounts?status=active&limit=10" \
-H "Authorization: Bearer $AUTOSTUD_API_KEY"一个视频、一个账号、一个时刻和一段文案。调用返回的是排队中的帖子,不是已发布的帖子,所以真实来源仍然是你自己的调度器。
curl -X POST https://autostud.ai/api/v1/actions/publishing.schedule_post \
-H "Authorization: Bearer $AUTOSTUD_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: lighthouse-ep12-tiktok" \
-d '{
"video_id": "0f4c8b71-2d95-47a3-9e6c-15b8ad7f3c20",
"account_id": "9a2c6f18-4b70-4d35-8e91-0f7d3c84b562",
"scheduled_at": "2026-08-21T18:30:00.000Z",
"caption": "Episode 12: the keeper who never slept #lighthouse"
}'按天分组读日历,按状态过滤队列,或者接住 post.published 然后不必再问。失败也走同一条路,并附上原因。
curl -X POST https://autostud.ai/api/v1/actions/publishing.calendar \
-H "Authorization: Bearer $AUTOSTUD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "from": "2026-08-17", "to": "2026-08-24" }'
# Need something more specific? The queue is a plain resource:
curl "https://autostud.ai/api/v1/scheduled_posts?status=error&platform=tiktok" \
-H "Authorization: Bearer $AUTOSTUD_API_KEY"四个字段。渲染好的文件、目标、时刻,以及文字。
video_id要发布的视频。必须已经渲染:队列发的是文件,不是时间轴。
account_id发往哪个已连接账号。一帖一个目标,所以一次失败绝不会拖垮其他。
scheduled_at什么时候发出。平台允许的任何时间,包括立刻。
caption随帖的文案。话题标签和 @ 都装在里面,原样发出。
日历回答"这周有什么要发",资源回答"这条视频后来怎么了"。两者都可过滤,所以不用多加一个端点就能搭出后台。
GET /api/v1/social_accountsGET /api/v1/scheduled_postspublishing.calendar排期是承诺,不是结果。平台接受之后 post.published 才触发;部分发布同样触发,此时负载里带着每个账号的结果。
post.publishedpost.failed不能,这是刻意的。账号在后台连接,好让 OAuth 令牌永远不离开服务器;API 能做的只是列出它们并向它们发布。
帖子留在队列里并标为错误状态,post.failed 带着原因触发。不会在你背后悄悄重试。
可以:每个目标调用一次。分开发送意味着某个平台拒了文案,也不会把其余的一起取消。
publishing.calendar 返回两个日期之间按天分组的计划帖。想更细就按 status、platform 或 video_id 过滤 scheduled_posts 资源。