Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apidoc.deerapi.com/llms.txt

Use this file to discover all available pages before exploring further.

1. 处理重试逻辑

根据接口返回的 code 是否为 200 判断任务是否提交成功:
  • 成功时 msg 返回成功信息
  • 失败时 msg 返回具体错误原因

2. 任务回调

推荐使用 Webhook 方式接收任务状态变更。在提交任务时传入 callback_url 参数,当视频生成状态(进度变化 / 失败 / 成功)发生改变时,DeerAPI 会以 POST 形式推送到该 URL。

回调示例

{
  "task_id": "d51c94db-f7fa-4ad3-a083-b8918686c478",
  "status": "3",
  "prompt": "一只小猫",
  "prompt_en": "a little kitten.",
  "video_url": "https://runwaycdn.deerapi.com/attachments/video/runway/20241011/8af2304880d6b32bfff5f0ea33007566.mp4",
  "poster": "https://runwaycdn.deerapi.com/attachments/video/runway/20241011/6771c68bf540b62a96e7c4a5b2b375a7.png",
  "last_frame": "https://runwaycdn.deerapi.com/attachments/video/runway/20241011/8af7cc2b46fc7ad5d1e0efedd0bd0893.png",
  "msg": null,
  "point": "320",
  "refund": "0",
  "create_time": "1728622596",
  "update_time": "1728622955"
}

回调字段说明

字段说明
task_id任务唯一 ID
status状态码:1 生成中、2 失败、3 成功
prompt原始提示词
prompt_en英文翻译后的提示词
video_url生成的视频地址(成功时返回)
poster视频封面图 URL
last_frame视频最后一帧图 URL
msg错误信息(成功时为 null
point消耗积分
refund退还积分(失败时退还)
create_time任务创建时间(Unix 时间戳)
update_time任务更新时间(Unix 时间戳)