获取图像模型列表

所有图像模型、它们接受的字段及价格。无需密钥。

GET

POST /images 支持的模型,以及你要支付的价格。价格以美元计,用十进制字符串表示,模型计费的每一项各占一行:它生成的图像,以及它读取的图像或文本。

如果模型按请求无法限定上限的内容计费(比如字体),就不会被列出。模型上线或下线时列表会变化,最多每小时变一次,所以可以缓存几分钟。

无需密钥,任何人都可以读取。

返回

  • dataobject[]

    每个图像模型一条。

    • idstring

      作为 model 发送的 ID。

    • namestring

      显示名称。

    • reads_imagesboolean

      是否接受 input_references。

    • streamingboolean

      是否流式输出部分图像。

    • parametersobject

      它接受的字段,每个字段附带取值({ "type": "enum", "values": [...] })或范围({ "type": "range", "min": 1, "max": 4 })。没有列出的字段不被接受。

    • pricingobject[]

      你要支付的价格,每个计费项一行:billable(output_image、input_image、input_reference 或 input_text),unit(image、megapixel、token 或 request),以十进制字符串表示的 usd,以及价格只适用于某个档位或质量时出现的 variant,比如 2k 或 low_1k。

请求
curl https://binference.io/api/v1/images/models
返回
{  "object": "list",  "data": [    {      "id": "recraft/recraft-v4.1-flash",      "object": "model",      "name": "Recraft: Recraft V4.1 Flash",      "reads_images": false,      "streaming": false,      "parameters": {        "aspect_ratio": {          "type": "enum",          "values": [            "1:1",            "4:3",            "3:4",            "16:9",            "9:16",            "auto"          ]        },        "n": {          "type": "range",          "min": 1,          "max": 6        }      },      "pricing": [        {          "billable": "output_image",          "unit": "image",          "usd": "0.0084"        }      ]    }  ]}