GET /v1/models
列出所有可用模型及其元数据
请求
GET /api/v1/models
Authorization: Bearer sk_xxx查询参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
modality | string | — | 按模态过滤:video / image / audio / music / speech / 3d。目前只有 video 和 image 会返回模型。 |
示例
curl "https://genace.ai/api/v1/models?modality=image" \
-H "authorization: Bearer sk_xxx"响应
200 OK
{
"data": [
{
"id": "nano-banana",
"modality": "image",
"display_name": "Nano Banana",
"upstream": "fal",
"fields": [
{
"name": "prompt",
"label": "Playground.fields.prompt",
"kind": "textarea",
"required": true,
"placeholder": "描述你想生成的图片..."
},
{
"name": "aspectRatio",
"label": "Playground.fields.aspectRatio",
"kind": "select",
"default": "1:1",
"options": [
{ "value": "1:1", "label": "1:1" },
{ "value": "16:9", "label": "16:9" }
]
},
{
"name": "n",
"label": "Playground.fields.n",
"kind": "number",
"default": 1,
"min": 1,
"max": 4
}
]
}
]
}字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 模型 id —— 在生成请求体中作为 model 字段传入 |
modality | string | video / image / audio / music / speech / 3d |
display_name | string | 人类可读的名称 |
upstream | string | 上游 Provider(目前始终为 fal) |
fields | array | 该模型的 Playground 表单字段描述;若模型未实现 playgroundFields() 则为 [],此时客户端应回退为通用的 prompt 字段 |
fields[].kind 取值为 text / textarea / number / select /
image-url 之一。字段的 name 与生成请求体中对应的 key 一致(例如
aspectRatio → aspect_ratio)。
完整的人类可读价格与能力对比表见 模型。
Genace 文档