GET
/
api
/
open
/
v2
/
image
/
market
/
list
查询算力市场镜像
curl --request GET \
  --url https://www.chenyu.cn/api/open/v2/image/market/list
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "image_list": [
      {
        "uuid": "<string>",
        "components": {
          "CUDA": "<string>",
          "PaddlePaddle": "<string>",
          "PyTorch": "<string>",
          "Python": "<string>",
          "TensorFlow": "<string>",
          "Ubuntu": "<string>"
        },
        "size": 123,
        "created_at": 123,
        "updated_at": 123
      }
    ],
    "total": 123,
    "page": 123,
    "page_size": 123
  }
}

查询算力市场镜像

获取算力市场中所有可用的镜像列表。
无需认证: 此接口为公开接口,无需提供API Key即可访问。

请求参数

page
integer
页码,从1开始
page_size
integer
每页数量
cuda_version
string
CUDA版本,如:11.8.0等
python_version
string
Python版本,如:3.8、3.9、3.10等

响应参数

code
integer
响应码
msg
string
响应信息
data
object
返回数据

代码示例

import requests

url = "https://www.chenyu.cn/api/open/v2/image/market/list"
headers = {
    "Authorization": "Bearer your_api_key",
    "Content-Type": "application/json"
}

params = {
    "page": 1,
    "page_size": 20,
    "cuda_version": "11.8",
    "python_version": "3.9"
}

response = requests.get(url, headers=headers, params=params)
result = response.json()

print("算力市场镜像列表:")
print(f"总数: {result['data']['total']}, 当前页: {result['data']['page']}")
for image in result['data']['image_list']:
    print(f"UUID: {image['uuid']}")
    print(f"CUDA版本: {image['components']['CUDA']}")
    print(f"Python版本: {image['components']['Python']}")
    print(f"PyTorch版本: {image['components']['PyTorch']}")
    print(f"TensorFlow版本: {image['components']['TensorFlow']}")
    print(f"镜像大小: {image['size']} 字节")
    print("---")

响应示例

{
  "code": 0,
  "msg": "查询成功",
  "data": {
    "image_list": [
      {
        "uuid": "ceb70da2df074c9e99905b6a4f4db032",
        "components": {
          "CUDA": "11.8.0",
          "PaddlePaddle": "2.5.2",
          "PyTorch": "2.1.2",
          "Python": "3.10",
          "TensorFlow": "2.16.2",
          "Ubuntu": "22.04"
        },
        "size": 19372840210,
        "created_at": 1743213028,
        "updated_at": 1743215603
      }
    ],
    "total": 84,
    "page": 1,
    "page_size": 1
  }
}