调用流程
Coze 插件请只配置本文档中的 3 个 POST 接口:
/coze/transcribe、/coze/task-status、/coze/task-result。旧的 GET 查询地址仅保留兼容,不要在 Coze 插件里使用。Coze 的出参字段不要写
data.status、data.items.text 这种点号路径。Momoget 已把常用结果放到顶层,请直接配置 status、text、task_id、remaining_tasks 等字段。- 调用创建任务接口,传入用户编号和视频链接,拿到
task_id。 - 等待 10 到 20 秒后,调用查询状态接口,直到
status变为completed。 - 调用获取文案接口,读取顶层
text字段。
任务状态可能是
pending、processing、completed、failed。未完成时不要直接判定失败,应等待后再次查询。1. 创建任务
POSThttps://www.momoget.cn/api/v1/coze/transcribe
Header
| Key | Value | 说明 |
|---|---|---|
| Content-Type | application/json | JSON 请求体。Coze 自动添加时可不手动填写。 |
| Authorization | 不需要 | 插件授权方式选择“不需要授权”,Header 不需要额外填写。 |
| User-Agent | 可选 | 可填写 Coze/1.0,也可以不填。 |
入参说明
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| user_id | string | 是 | Momoget 用户编号。创建成功后扣该用户 1 次。 |
| video_url | string | 是 | 单个公开视频链接,支持抖音、B站、快手、小红书、今日头条。 |
| links | string[] | 否 | 批量链接数组,最多 5 个。和 video_url 二选一即可。 |
入参示例
{
"user_id": "eaab7202-5ab7-4257-b1e8-5dd0fbb7e7d3",
"video_url": "https://v.douyin.com/xxxx/"
}
出参说明
在 Coze 插件里登记出参时,推荐只登记下面这些顶层字段:
code、message、task_id、status、remaining_tasks、detail_url。不要登记 data.task_id。| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 业务状态码,创建成功为 201。 |
| message | string | 提示信息。 |
| task_id | string | 任务编号,后续查询状态和结果使用。 |
| status | string | 初始通常为 pending。 |
| remaining_tasks | integer | 用户剩余使用次数。 |
| detail_url | string | 网站控制台任务链接。 |
出参示例
{
"code": 201,
"message": "任务创建成功",
"task_id": "a02abb55-cba9-4385-9311-88416757c2f9",
"user_id": "eaab7202-5ab7-4257-b1e8-5dd0fbb7e7d3",
"status": "pending",
"remaining_tasks": 3,
"detail_url": "https://www.momoget.cn/?view=console&task_id=a02abb55-cba9-4385-9311-88416757c2f9",
"data": {
"task_id": "a02abb55-cba9-4385-9311-88416757c2f9",
"user_id": "eaab7202-5ab7-4257-b1e8-5dd0fbb7e7d3",
"status": "pending",
"remaining_tasks": 3,
"detail_url": "https://www.momoget.cn/?view=console&task_id=a02abb55-cba9-4385-9311-88416757c2f9"
},
"timestamp": "2026-06-07T03:56:48.194444Z"
}
2. 查询任务状态
POSThttps://www.momoget.cn/api/v1/coze/task-status
入参说明
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
| task_id | Body | string | 创建任务接口返回的 task_id。 |
| user_id | Body | string | Momoget 用户编号,用于校验任务归属。 |
请求示例
POST https://www.momoget.cn/api/v1/coze/task-status
Content-Type: application/json
{
"user_id": "eaab7202-5ab7-4257-b1e8-5dd0fbb7e7d3",
"task_id": "a02abb55-cba9-4385-9311-88416757c2f9"
}
出参说明
在 Coze 插件里登记出参时,推荐只登记顶层字段:
status、total_count、processed_count、success_count、failed_count、error_message。| 字段 | 类型 | 说明 |
|---|---|---|
| status | string | pending、processing、completed、failed。 |
| total_count | integer | 任务内链接总数。 |
| processed_count | integer | 已处理链接数。 |
| success_count | integer | 成功数量。 |
| failed_count | integer | 失败数量。 |
| error_message | string/null | 失败提示。 |
出参示例
{
"code": 200,
"message": "success",
"task_id": "a02abb55-cba9-4385-9311-88416757c2f9",
"user_id": "eaab7202-5ab7-4257-b1e8-5dd0fbb7e7d3",
"status": "completed",
"total_count": 1,
"processed_count": 1,
"success_count": 1,
"failed_count": 0,
"error_message": null,
"data": {
"task_id": "a02abb55-cba9-4385-9311-88416757c2f9",
"user_id": "eaab7202-5ab7-4257-b1e8-5dd0fbb7e7d3",
"status": "completed",
"total_count": 1,
"processed_count": 1,
"success_count": 1,
"failed_count": 0,
"error_message": null,
"created_at": "2026-06-07T03:56:48",
"updated_at": "2026-06-07T03:58:12"
},
"timestamp": "2026-06-07T03:58:15.000000Z"
}
3. 获取文案结果
POSThttps://www.momoget.cn/api/v1/coze/task-result
入参说明
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
| task_id | Body | string | 创建任务接口返回的 task_id。 |
| user_id | Body | string | Momoget 用户编号。 |
请求示例
POST https://www.momoget.cn/api/v1/coze/task-result
Content-Type: application/json
{
"user_id": "eaab7202-5ab7-4257-b1e8-5dd0fbb7e7d3",
"task_id": "a02abb55-cba9-4385-9311-88416757c2f9"
}
出参说明
Coze 最常读取的是顶层
text。批量链接也会返回 items,但如果插件配置页不方便表达数组字段,优先使用顶层 text 获取合并后的主要文案。| 字段 | 类型 | 说明 |
|---|---|---|
| status | string | 任务状态。 |
| items | array | 视频结果数组。批量链接时会有多条。 |
| title | string | 视频标题。 |
| platform | string | 平台:douyin、bilibili、kuaishou、xiaohongshu、toutiao。 |
| text | string | 最终文案内容,Coze 主要读取这个字段。 |
| word_count | integer | 文案字数。 |
| item_error_message | string/null | 单条视频失败提示。 |
出参示例
{
"code": 200,
"message": "success",
"task_id": "a02abb55-cba9-4385-9311-88416757c2f9",
"user_id": "eaab7202-5ab7-4257-b1e8-5dd0fbb7e7d3",
"status": "completed",
"total_count": 1,
"processed_count": 1,
"success_count": 1,
"failed_count": 0,
"error_message": null,
"item_count": 1,
"title": "视频标题",
"platform": "douyin",
"text": "这里是提取出来的视频文案内容",
"word_count": 128,
"item_error_message": null,
"data": {
"task_id": "a02abb55-cba9-4385-9311-88416757c2f9",
"user_id": "eaab7202-5ab7-4257-b1e8-5dd0fbb7e7d3",
"status": "completed",
"total_count": 1,
"processed_count": 1,
"success_count": 1,
"failed_count": 0,
"error_message": null,
"items": [
{
"video_id": "video-id",
"title": "视频标题",
"platform": "douyin",
"status": "transcribed",
"url": "https://v.douyin.com/xxxx/",
"text": "这里是提取出来的视频文案内容",
"word_count": 128,
"error_message": null
}
]
},
"timestamp": "2026-06-07T03:58:20.000000Z"
}
错误返回
| HTTP 状态 | 场景 | 示例 |
|---|---|---|
| 400 | 链接无效、次数不足、参数错误 | {"detail":"用户转化次数不足"} |
| 403 | 任务不属于该用户 | {"detail":"任务不属于该用户"} |
| 404 | 用户或任务不存在 | {"detail":"用户不存在"} |