产品与价格
可用的产品,以及各自的模式、每秒单价和限制。
GET https://api.nanoapi.ai/v1/productscurl https://api.nanoapi.ai/v1/products \
-H "Authorization: Bearer $NANOAPI_API_KEY"响应:200 OK
{
"object": "list",
"data": [
{
"id": "genjutsu",
"object": "product",
"name": "Genjutsu",
"description": "Generate a new video from a source video and reference images.",
"models": ["genjutsu-1.0"],
"default_model": "genjutsu-1.0",
"modes": ["motion_control", "replace_object"],
"output_type": "video",
"max_outputs": 1,
"billing_unit": "second",
"currency": "USD",
"prices": [
{ "resolution": "480p", "unit_price": "0.117" },
{ "resolution": "720p", "unit_price": "0.273" },
{ "resolution": "1080p", "unit_price": "0.78" }
],
"limits": { "max_source_video_seconds": 30 }
}
],
"has_more": false
}产品对象
| 字段 | 说明 |
|---|---|
id | 产品 ID,与任务对象的 product 对应 |
object | 固定为 product |
name | 产品名称 |
description | 简短说明 |
models | 可用的模型版本,用于 model 参数 |
default_model | 创建任务时不传 model 用的版本 |
modes | 支持的 mode 取值 |
output_type | 结果类型,Genjutsu 为 video |
max_outputs | num_outputs 的最大值 |
billing_unit | 计费单位,Genjutsu 为 second(秒) |
currency | 固定为 USD |
prices | 每个分辨率一项。unit_price 是每秒单价(美元),为十进制字符串。怎么算见 Genjutsu → 价格 |
limits.max_source_video_seconds | 源视频时长上限(秒),超过的返回 400 video_too_long。见 Genjutsu → 素材 |
价格和限制可能调整,请从这个接口读取,不要写死在代码里。