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 分钟后过期。
请求体:index-tts-2
说明台词要念多久,它就刚好念满。声音和表演单独设置。
audio_urlURL 字符串必填
要使用的声音。
promptstring必填
要生成什么,用日常的话描述。
strengthnumber0 至 1
对输入的改动幅度。越高改动越大。
should_use_prompt_for_emotionboolean
truefalseemotion_promptstring
emotional_strengthsobject
emotional_strengths.happynumber0 至 1
emotional_strengths.angrynumber0 至 1
emotional_strengths.sadnumber0 至 1
emotional_strengths.afraidnumber0 至 1
emotional_strengths.disgustednumber0 至 1
emotional_strengths.melancholicnumber0 至 1
emotional_strengths.surprisednumber0 至 1
emotional_strengths.calmnumber0 至 1
emotional_audio_urlURL 字符串
emotional_strengths.afraidnumber0 至 1
emotional_strengths.angrynumber0 至 1
emotional_strengths.calmnumber0 至 1
emotional_strengths.disgustednumber0 至 1
emotional_strengths.happynumber0 至 1
emotional_strengths.melancholicnumber0 至 1
emotional_strengths.sadnumber0 至 1
emotional_strengths.surprisednumber0 至 1
响应 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/index-tts-2" \
-H "Authorization: Key $MINIAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"audio_url":"https://cdn.example.com/voice.mp3","prompt":"a red fox runs through snow at dawn"}'响应 200
{
"request_id": "0192f3a4-5b6c-7d8e-9f01-23456789abcd",
"status": "IN_QUEUE",
"queue_position": 0,
"status_url": "https://api.minicut.ai/v1/queue/index-tts-2/requests/0192f3a4-5b6c-7d8e-9f01-23456789abcd/status",
"response_url": "https://api.minicut.ai/v1/queue/index-tts-2/requests/0192f3a4-5b6c-7d8e-9f01-23456789abcd",
"cancel_url": "https://api.minicut.ai/v1/queue/index-tts-2/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 秒后重试