API 参考 / 队列
POSThttps://api.minicut.ai/v1/queue/{model_id}
启动一个任务,并立即返回请求 ID。未知字段会被拒绝,返回 422。
路径
model_idstring必填
模型 ID,例如 seedance-2.5
查询参数
webhook_urlURL 字符串
任务结束时,我们把结果 POST 到这个地址。只支持 https 和公网地址。
请求头
Idempotency-Keystring
再次发送同一个 Idempotency-Key,会返回同一个请求,不会再次扣费。同一个 Idempotency-Key 配不同的请求体,返回 409。
X-Quote-Idstring
按 POST /v1/quote 为这个请求体给出的价格付费。15 分钟后过期。
请求体:seedance-1.0-pro-fast
做一个镜头最便宜的方式,最短 2 秒也不浪费。
promptstring必填
要生成什么,用日常的话描述。
aspect_ratiostring
结果的宽高比,例如 16:9 或 9:16。
21:916:94:31:13:49:16autoresolutionstring
输出分辨率。越高越清晰,也越慢、越贵。
480p720p1080pdurationstring
时长,单位是秒。价格随它变化。
23456789101112camera_fixedboolean
保持镜头不动。
truefalseimage_urlURL 字符串
作为起点的图片。我们会获取它,并为这个任务保留一份副本。
num_framesnumber29 至 289
要生成的帧数。
seedinteger
相同的 seed 配相同的设置,会得到相近的结果。不填则随机。
响应 200
request_idstring
statusstring
queue_positioninteger
排在这个任务前面、属于你的任务数。0 表示下一个启动
status_urlURL 字符串
response_urlURL 字符串
cancel_urlURL 字符串
pricestring
这次请求的价格,保留 6 位小数,币种由 `currency` 字段指明
currencystring
这个对象及其内部各项金额的币种。始终是 USD
curl -X POST "https://api.minicut.ai/v1/queue/seedance-1.0-pro-fast" \
-H "Authorization: Key $MINIAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"a red fox runs through snow at dawn","resolution":"720p","duration":"5"}'响应 200
{
"request_id": "0192f3a4-5b6c-7d8e-9f01-23456789abcd",
"status": "IN_QUEUE",
"queue_position": 0,
"status_url": "https://api.minicut.ai/v1/queue/seedance-1.0-pro-fast/requests/0192f3a4-5b6c-7d8e-9f01-23456789abcd/status",
"response_url": "https://api.minicut.ai/v1/queue/seedance-1.0-pro-fast/requests/0192f3a4-5b6c-7d8e-9f01-23456789abcd",
"cancel_url": "https://api.minicut.ai/v1/queue/seedance-1.0-pro-fast/requests/0192f3a4-5b6c-7d8e-9f01-23456789abcd/cancel",
"price": "1.750000",
"currency": "USD"
}400
invalid_json 请求体不是 JSON400
invalid_webhook_url webhook_url 不是 https,或指向私有地址401
missing_api_key 没有 Authorization 请求头401
invalid_api_key 密钥错误、不存在或已被撤销402
insufficient_balance 你的余额低于价格403
account_frozen 账户已被冻结409
idempotency_conflict Idempotency-API Key 相同,但请求体不同410
quote_expired 报价已超过 15 分钟,或属于另一个请求体422
validation_error 某个字段不符合该模型的设置422
input_fetch_failed 无法获取某个输入 URL422
content_refused 内容检查拒绝了它429
rate_limited 请求太多,请等待 Retry-After 指定的时间500
internal_error 问题在我们这边,请重试503
model_unavailable 暂时无法接收任务,请 60 秒后重试