加载中跳到主要内容

接入与发现

查询模型目录

读取公开目录中的可用模型、输入 schema、限制与当前积分价格。

接口

GET/api/v1/developer/models

鉴权与 Scope

公开接口,无需 bearer。

无需 bearer。使用响应中的完整 model_key、operations 与 input_schema。可用性及定价可能变化,不推测缺失价格。

请求参数

无请求 body 或查询参数。

curl --request GET \
  --url 'https://api.perchanceai.art/api/v1/developer/models' \
  --header 'X-App-Id: perchanceai' \
  --header 'X-Request-Id: docs-example'

响应 HTTP 200

以下为说明响应结构的示例,并非实时 API 响应。示例数值和 USD 不代表固定定价或资金余额。空字段省略。

REST 成功响应为 success、code、message、request_id 和 data;下表描述 data。

字段类型必填说明
modelsobject[]是包含 model_key、display_name、modality、operations、input_schema、description、limits、price_unit 与 price;空值省略。
{
  "success": true,
  "code": "OK",
  "message": "OK",
  "request_id": "docs-example",
  "data": {
    "models": [
      {
        "model_key": "<model_key_from_catalog>",
        "display_name": "Example image model",
        "modality": "image",
        "operations": [
          "image_generation"
        ],
        "input_schema": {
          "type": "object",
          "properties": {
            "prompt": {
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ]
        },
        "limits": {}
      }
    ]
  }
}

相关错误

该公开目录无需鉴权;其他请求错误使用标准 REST 错误结构。