Skip to content

获取模型列表

1. 获取模型列表

https://aiping.cn/api/v1/models

1.1 请求参数

1.2 返回格式

python
class ModelListResponse(BaseModel):
    object: str = "list"
    data: List[ModelInfo]


class ModelInfo(BaseModel):
    id: str
    object: str = "model"
    created: int = 0
    owned_by: str = "system"
    status: bool = True
    price: Price
    input_length_range: List[int]


class Price(BaseModel):
    input_price_range: List[float]
    output_price_range: List[float]

一个实例

python
{
  "object": "list",
  "data": [
    {
      "id": "Qwen3-Coder-480B-A35B-Instruct",
      "object": "model",
      "created": 0,
      "owned_by": "system",
      "status": true,
      "price": {
        "input_price_range": [
          6,
          8
        ],
        "output_price_range": [
          16,
          24
        ]
      }
    }
  ]
}

1.3 请求示例

shell
curl https://aiping.cn/api/v1/models