获取用户生成模型列表

获取当前已上架的生图、生视频模型。生图和生视频模型均不限制平台、全部下发。返回的模型ID用于提交用户自定义生图或生视频任务。

请求URL:

  • /getGenerateModelList

请求方式:

  • POST

header:

参数名 必选 类型 说明
Authorization string 授权Token,格式:Bearer {token}

参数:

参数名 必选 类型 说明
appId string App唯一标识
udid string 唯一设备ID
type uint8 模型类型:0-全部;1-生图;2-生视频,默认0

请求示例:

{
    "appId": "com.example.app",
    "udid": "device-uuid",
    "type": 0
}

返回示例:

{
    "code": 200,
    "msg": "SUCCESS",
    "data": {
        "list": [
            {
                "id": 58,
                "title": "Illustration XL",
                "description": "Illustration image model",
                "coverImg": "https://cdn.example.com/model/image-model-cover.jpg",
                "cost": 4,
                "width": 1024,
                "height": 1024,
                "duration": 3,
                "fps": 24,
                "type": 1,
                "typeApi": 1,
                "baseTextImg": 0
            },
            {
                "id": 59,
                "title": "Wan Video",
                "description": "Image-to-video model",
                "coverImg": "https://cdn.example.com/model/video-model-cover.jpg",
                "cost": 14,
                "width": 480,
                "height": 832,
                "duration": 3,
                "fps": 16,
                "type": 2,
                "typeApi": 3,
                "baseTextImg": 2
            }
        ]
    }
}

返回参数说明:

参数名 类型 说明
code int 状态码
msg string 提示信息
data struct 返回数据
- list array 模型列表
-- id uint 模型ID,提交生成任务时作为 modelId
-- title string 模型标题
-- description string 模型描述
-- coverImg string 模型封面图地址;未配置时为空字符串
-- cost uint 模型基础消耗钻石数;实际扣费可能受VIP折扣影响
-- width uint 模型默认宽度
-- height uint 模型默认高度
-- duration uint 默认视频时长,单位秒;图片模型可忽略
-- fps uint 默认视频帧率;图片模型可忽略
-- type uint8 模型类型:1-生图;2-生视频
-- typeApi uint8 平台类型:1-Runware.ai;2-TensorArt;3-WaveSpeed.ai
-- baseTextImg uint8 模型输入能力:0-文字和图片都支持;1-仅文字;2-仅图片

备注:

仅返回 state=1 的已上架模型。type=1type=2 均不限制 type_api,返回对应类型下所有平台的模型;type=0 时合并返回全部生图、生视频模型。前端可根据 baseTextImg 判断模型是否需要参考图。无数据时 list 为空数组。

错误码:

  • 510 系统异常
  • 670 登录失效
  • 800 参数错误
2021 © Live all right reserved,powered by Gitbook该文件修订时间: 2026-08-10 18:19:52

results matching ""

    No results matching ""