快速开始
三步完成从零到成品视频。每个请求都是纯 HTTPS JSON,支持任何语言或工具。
- 1
- 2
提交任务
发送模型、提示和任何选项。提交时扣除信用,响应会告知扣除数量及剩余余额。
curl -X POST https://novamotions.com/api/v1/videos \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2-pro", "prompt": "夜晚雨中霓虹街道的缓慢推镜,湿润柏油路面反光,电影感", "duration": 5, "resolution": "720p", "aspect_ratio": "16:9" }' - 3
轮询直到完成
每隔几秒检查任务状态。状态为成功时,从 output_url 下载文件。若失败,信用已退回余额。
TASK_ID=your_task_id while true do TASK=$(curl -s https://novamotions.com/api/v1/tasks/$TASK_ID -H "Authorization: Bearer $API_KEY") STATUS=$(echo "$TASK" | jq -r .status) echo "$STATUS" if [ "$STATUS" = "succeeded" ] || [ "$STATUS" = "failed" ] then echo "$TASK" | jq break fi sleep 5 done
认证
在每个请求的 Authorization 头中发送您的密钥。密钥以 nm_live_ 开头,属于一个账户。
Authorization: Bearer nm_live_your_api_key
Content-Type: application/json- 基础 URL
- 所有端点均位于 https://novamotions.com/api/v1 下,返回 JSON。
- 保密密钥
- 请从服务器调用 API,切勿从浏览器或移动应用调用。撤销的密钥立即失效。
- 统一余额
- API 调用消耗密钥所有者的信用,与工作室使用同一余额。生成时也适用计划限制。
- 媒体 URL
- 传入的图像、视频和音频必须是无需登录或 Cookie 的公开 https URL。
模型列表
/api/v1/modelsAPI 提供的所有模型,包含模式、时长、分辨率、宽高比、音频支持、参考限制及最低信用价格。用于构建模型选择器,避免硬编码选项。
请求
curl https://novamotions.com/api/v1/models \
-H "Authorization: Bearer $API_KEY"响应
{
"object": "list",
"data": [
{
"slug": "seedance-2-pro",
"name": "Seedance 2.0 Pro",
"kind": "video",
"endpoint": "/api/v1/videos",
"available": true,
"modes": [
"text-to-video",
"image-to-video",
"reference-to-video"
],
"durations": [
4,
5,
6,
8,
10,
12,
15
],
"default_duration": 5,
"resolutions": [
"480p",
"720p",
"1080p",
"4K"
],
"aspect_ratios": [
"16:9",
"9:16",
"1:1",
"4:3",
"3:4",
"21:9"
],
"audio": {
"supported": true,
"extra_credits": 20
},
"references": {
"images": 9,
"videos": 3,
"audio": 3,
"end_frame": true
},
"max_count": 4,
"prompt_max_length": 10000,
"from_credits": 35
}
]
}检查余额
/api/v1/balance密钥所有者当前可用的信用,按池及过期日期划分,及当前计划信息。
请求
curl https://novamotions.com/api/v1/balance \
-H "Authorization: Bearer $API_KEY"响应
{
"object": "balance",
"balance": 1175,
"never_expiring": 375,
"next_expiry": "2026-11-17T00:00:00.000Z",
"pools": [
{
"source": "subscription",
"remaining": 800,
"granted": 2000,
"expires_at": "2026-11-17T00:00:00.000Z"
},
{
"source": "topup",
"remaining": 375,
"granted": 375,
"expires_at": null
}
],
"plan": {
"name": "Pro",
"status": "active",
"cycle": "monthly",
"renews_or_ends_at": "2026-11-14T00:00:00.000Z"
}
}创建视频
/api/v1/videos文本转视频、图像转视频(起始帧,可选结束帧)或参考视频(引导结果的图像、剪辑和音频)。未指定时根据输入自动选择模式。
参数
modelstring必填来自模型端点的模型标识。promptstring必填视频中应发生的内容。图像转视频可选,起始帧为主导。modestring可选text-to-video、image-to-video 或 reference-to-video。未指定时根据输入自动选择。durationinteger可选剪辑时长(秒)。必须是模型支持的时长之一,否则使用默认值。resolutionstring可选输出分辨率,如 720p 或 1080p,来自模型列表。aspect_ratiostring可选16:9、9:16、1:1、4:3、3:4 或 21:9,来自模型列表。默认 16:9。audioboolean可选在支持的模型上生成包含对话、效果和环境音的配乐。需额外支付 20 积分。默认关闭。image_urlstring (URL)可选图像转视频的起始帧。end_image_urlstring (URL)可选结束帧,仅支持首尾帧的模型可用。reference_image_urlsstring[]可选参考转视频的参考图片,最多可达模型限制。reference_video_urlsstring[]可选参考转视频的参考视频片段,最多可达模型限制。reference_audio_urlsstring[]可选指导配乐的音频,最多可达模型限制。countinteger可选同一请求生成的视频数量,1 到 4 个。每个为独立任务,单独计费。seedinteger可选固定种子以获得可重复结果。批量中的每个额外项目使用下一个种子。
请求
curl -X POST https://novamotions.com/api/v1/videos \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-pro",
"prompt": "夜晚雨中霓虹街道的缓慢推镜,湿润柏油路面反光,电影感",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}'响应
{
"tasks": [
{
"id": "cmtask8k2x0001ab7c9d0e1f2",
"status": "queued",
"credits": 44,
"url": "https://novamotions.com/api/v1/tasks/cmtask8k2x0001ab7c9d0e1f2"
}
],
"credits_charged": 44,
"balance": 1131
}创建图像
/api/v1/images文本转图像,或用提示编辑现有图像。每次请求最多可请求四张图像,每张图像为独立任务。
参数
modelstring必填来自模型端点的模型标识。promptstring必填图像应显示的内容,或如何修改传入的图像。modestring可选文本生成图像或图像编辑。未指定时从输入中选择。resolutionstring可选1K、2K 或 4K,来自模型列表。aspect_ratiostring可选来自模型列表的宽高比,支持的模型含自动选项。image_urlstring (URL)可选要编辑的图像。图像编辑必填。reference_image_urlsstring[]可选编辑时的额外参考图片,最多可达模型限制。countinteger可选每个提示生成的图像数量,1 到 4 个。每个为独立任务。seedinteger可选固定种子以获得可重复结果。批量中的每个额外项目使用下一个种子。
请求
curl -X POST https://novamotions.com/api/v1/images \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "橡木桌上的陶瓷咖啡杯工作室产品照,柔和窗光,浅景深",
"resolution": "1K",
"aspect_ratio": "1:1",
"count": 1
}'响应
{
"tasks": [
{
"id": "cmtask8k2x0001ab7c9d0e1f2",
"status": "queued",
"credits": 3,
"url": "https://novamotions.com/api/v1/tasks/cmtask8k2x0001ab7c9d0e1f2"
}
],
"credits_charged": 3,
"balance": 1172
}创作歌曲
/api/v1/music根据描述生成完整歌曲,可包含您自己的歌词或纯器乐。
参数
modelstring必填来自模型端点的模型标识。promptstring必填歌曲的风格、氛围、乐器和节奏。durationinteger可选歌曲时长(秒),来自模型支持的时长。lyricsstring可选您自己的歌词。留空则由模型生成。instrumentalboolean可选制作无人声歌曲。默认关闭。
请求
curl -X POST https://novamotions.com/api/v1/music \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ai-music",
"prompt": "温暖的 lo-fi 嘻哈,柔和钢琴,黑胶噼啪声,轻松的深夜节奏",
"duration": 60,
"instrumental": false
}'响应
{
"tasks": [
{
"id": "cmtask8k2x0001ab7c9d0e1f2",
"status": "queued",
"credits": 11,
"url": "https://novamotions.com/api/v1/tasks/cmtask8k2x0001ab7c9d0e1f2"
}
],
"credits_charged": 11,
"balance": 1164
}获取任务
/api/v1/tasks/{id}通过任务 ID 轮询任务。状态成功时,output_url 指向完成文件。轮询使用读取限制,不消耗提交额度。
请求
curl https://novamotions.com/api/v1/tasks/cmtask8k2x0001ab7c9d0e1f2 \
-H "Authorization: Bearer $API_KEY"响应
{
"id": "cmtask8k2x0001ab7c9d0e1f2",
"object": "task",
"kind": "video",
"model": "seedance-2-pro",
"mode": "text-to-video",
"status": "succeeded",
"progress": 100,
"prompt": "夜晚雨中霓虹街道的缓慢推镜,湿润柏油路面反光,电影感",
"params": {
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"audio": false,
"seed": null
},
"output_url": "https://novamotions.com/uploads/videos/2026/10/example.mp4",
"thumbnail_url": "https://novamotions.com/uploads/videos/2026/10/example.jpg",
"width": 1280,
"height": 720,
"duration_seconds": 5,
"credits": 44,
"refunded": false,
"error": null,
"created_at": "2026-10-18T09:30:00.000Z",
"completed_at": "2026-10-18T09:31:12.000Z"
}任务列表
/api/v1/tasks您通过 API 创建的最近 30 天内的任务,最新优先,格式与单个任务相同。传入 next_cursor 作为游标加载下一页。
参数
limitinteger可选每页结果数量,1 到 50。默认 20。cursorstring可选上一页返回的 next_cursor 值。statusstring可选仅显示此状态的任务:排队中、运行中、成功或失败。
请求
curl https://novamotions.com/api/v1/tasks?limit=20 \
-H "Authorization: Bearer $API_KEY"响应
{
"object": "list",
"data": [
{
"id": "cmtask8k2x0001ab7c9d0e1f2",
"object": "task",
"kind": "video",
"model": "seedance-2-pro",
"mode": "text-to-video",
"status": "succeeded",
"progress": 100,
"prompt": "夜晚雨中霓虹街道的缓慢推镜,湿润柏油路面反光,电影感",
"params": {
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"audio": false,
"seed": null
},
"output_url": "https://novamotions.com/uploads/videos/2026/10/example.mp4",
"thumbnail_url": "https://novamotions.com/uploads/videos/2026/10/example.jpg",
"width": 1280,
"height": 720,
"duration_seconds": 5,
"credits": 44,
"refunded": false,
"error": null,
"created_at": "2026-10-18T09:30:00.000Z",
"completed_at": "2026-10-18T09:31:12.000Z"
}
],
"next_cursor": null
}任务状态
任务从排队转为运行,最终为成功或失败。达到任一终态时停止轮询。
queued- 已接受,等待渲染槽位。继续轮询。
running- 正在渲染。进度从 0 到 99。
succeeded- 完成。output_url 和 thumbnail_url 指向完成文件。
failed- 未生成结果结束。error 说明原因,refunded 为 true,积分已返还余额。
错误代码
每个错误格式相同。根据代码分支,向用户显示信息。任务被接受后仍可能失败,轮询时请检查状态。
{
"error": {
"code": "insufficient_credits",
"message": "Not enough credits for this request. Top up or renew your plan, then retry.",
"needed": 44,
"balance": 14
}
}- 400
invalid_json请求体不是 JSON 对象。 - 401
unauthorizedAuthorization 头缺少 Bearer 密钥。 - 401
invalid_api_key密钥不存在或格式错误。 - 401
key_revoked密钥已被撤销。请创建新密钥。 - 402
insufficient_credits积分不足以完成请求。响应包含所需和余额。 - 403
plan_limit_exceeded请求超出套餐每次生成限制。请降低时长或分辨率。 - 403
account_suspended密钥所属账户已被暂停。 - 403
api_disabledAPI 当前已关闭。 - 404
not_found任务或端点在此账户不存在。 - 404
model_not_found无此模型标识。请检查模型端点。 - 409
too_many_running该账户已有 3 个任务运行中,请等待其中一个完成。 - 422
invalid_request字段缺失或类型错误。details 列出具体问题。 - 422
wrong_endpoint模型属于其他端点,例如图像模型发送到视频端点。 - 422
invalid_mode此端点不支持该模式。 - 422
mode_not_supported模型不支持此模式。 - 422
prompt_required此模式需要提示词。 - 422
image_required此模式需要 image_url。 - 429
rate_limited请求过多。请等待 Retry-After 指定的秒数后重试。 - 500
internal_error服务器内部错误。请稍后重试。 - 503
service_busy当前服务繁忙。请几分钟后重试。
积分与退款
提交时一次性扣费
每个任务费用与工作室相同。提交响应返回 credits_charged 和新余额。视频配音需额外支付 20 积分。
失败任务全额退款
任务因任何原因失败时,积分全额返还至原积分池,任务显示 refunded 为 true,无需申请。
套餐限制适用
套餐的每次生成限制同样适用于 API 任务。先使用即将过期积分,最后使用充值积分。
速率限制
限制按密钥每分钟滚动计数。超限时返回 HTTP 429 并带 Retry-After 秒数。每个响应包含 X-RateLimit 头,方便提前减速。
- 提交
- 每分钟 30 次
- 创建视频、图像和歌曲。
- 读取
- 每分钟 120 次
- 任务、余额和模型。与提交计数分开。
- 同时运行任务数
- 3
- 账户同时渲染的任务数。
HTTP/1.1 429 Too Many Requests
Retry-After: 42
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 42模型
您今天可以调用的模型及其标识和最低价格。模型端点返回相同列表及所有选项。
- Seedance 2.5
seedance-2-5视频45 积分 - Seedance 2.0 Pro
seedance-2-pro视频35 积分 - Seedance 2.0 Mini
seedance-2-mini视频24 积分 - Wan 3.0
wan-3视频46 积分 - MiniMax H3
minimax-h3视频30 积分 - Kling 3
kling-3视频30 积分 - Seedance 1.5 Pro
seedance-1-5-pro视频31 积分 - Seedance 1.0
seedance-1视频32 积分 - Kling O3
kling-o3视频46 积分 - Kling 2.6
kling-2-6视频41 积分 - Wan 2.7
wan-2-7视频35 积分 - Wan
wan视频32 积分 - Grok
grok-video视频47 积分 - Veo 3
veo-3视频42 积分 - GPT Image 2.5
gpt-image-2-5图像4 积分 - GPT Image 2
gpt-image-2图像3 积分 - Seedream 5 Pro
seedream-5-pro图像4 积分 - Seedream 5
seedream-5图像3 积分 - Nano Banana Pro
nano-banana-pro图像5 积分 - Nano Banana 2
nano-banana-2图像3 积分 - Nano Banana 2 Lite
nano-banana-2-lite图像2 积分 - AI Music
ai-music音乐6 积分
准备好开始了吗?
在您的账户中创建一个密钥,一分钟内发送您的第一个请求。