API 文档

所有接口用 Bearer Key 鉴权,在「工作台 → API Key」创建。

1. 创建任务

POST /v1/jobs
Authorization: Bearer mk_live_xxx
Content-Type: application/json

{"template":"kinetic-tech","title":"标题","text":"一段文案。第二句。第三句。"}

返回 202:{"id":"job_xxx","points":10,"balance_after":990}

2. 轮询状态

GET /v1/jobs/{id}   →   {"status":"preview_ready","preview_url":"/files/..."}

状态:queued → planning → preparing → previewing → preview_ready →rendering → done

3. 确认渲染

POST /v1/jobs/{id}/render   →  {"status":"queued_render"}

4. 取结果

GET /files/{id}/preview.png
GET /files/{id}/silent-with-audio.mp4

5. 账户

GET /v1/account  →  {"balance":990,"points_per_second":1}
GET /v1/templates → 模板列表

错误码

码含义
401Key 无效或已停用
402余额不足(返回 needed / balance)
403Key 没有该 scope
429超过 Key 的每日点数或 RPM