跳转到主要内容
GET
/
gpus
/
v2
/
instances
查询实例列表
curl --request GET \
  --url https://api.ppio.com/gpus/v2/instances \
  --header 'Authorization: <authorization>'
{
  "data": [
    {
      "id": "ca338f12f3",
      "name": "example-instance",
      "type": "gpu",
      "product_id": "product-id",
      "image": "registry.example.com/namespace/image:tag",
      "registry_auth_id": "registry-auth-id",
      "entrypoint": "",
      "command": "",
      "billing": {
        "mode": "prepaid",
        "prepaid": {
          "months": 1,
          "end_time": 123,
          "auto_renew": {
            "enabled": true,
            "months": 1,
            "status": "active"
          }
        }
      },
      "envs": [
        {
          "key": "ENV_NAME",
          "value": "ENV_VALUE"
        }
      ],
      "ports": [
        {
          "port": 8080,
          "protocol": "tcp",
          "endpoint": "http://1.2.3.4:8080"
        }
      ],
      "resource_specs": {
        "rootfs_size_gb": 20,
        "gpu_num": 1,
        "cpu_num": 8,
        "memory_gb": 32,
        "gpu_ids": [
          0
        ]
      },
      "network": {
        "id": "",
        "ip": "10.2.1.1"
      },
      "volumes": [
        {
          "type": "network",
          "id": "network-storage-id",
          "mount_point": "/data"
        }
      ],
      "region": "region-id",
      "auto_migrate": {
        "enabled": false,
        "include_system_disk": false
      },
      "status": {
        "status": "running",
        "error": "",
        "message": ""
      },
      "created_at": 1714464000,
      "last_started_at": 1714467600,
      "last_stopped_at": 0,
      "member_id": "member-id",
      "owner_id": "550e8400-e29b-41d4-a716-446655440000",
      "region_version": "v1"
    }
  ],
  "next_cursor": "next-cursor-token",
  "has_more": true
}

请求头

Authorization
string
必填

Bearer 身份验证格式,例如:Bearer {{API 密钥}}

查询参数

limit
integer

本次最多返回的实例数量。不传或为 0 时使用服务端默认值。整数,取值 >= 0。

cursor
string

下一页游标。第一页不传或传空字符串,后续请求使用上一次响应中的 next_cursor。字符串,长度限制:0-1024 字符。

name
string

实例名称或 ID 模糊匹配。字符串,长度限制:0-255 字符。

status
string

实例状态过滤。字符串,长度限制:0-63 字符。

regions
string

实例所在区域过滤,多个用英文逗号分隔。字符串,长度限制:0-1024 字符。

billing_mode
string

计费模式过滤。可选值:postpaidprepaidspot。留空字符串时不过滤。

响应

200 - application/json

查询成功

data
object[]

实例列表

next_cursor
string

下一页游标。无下一页时为空字符串

示例:

"next-cursor-token"

has_more
boolean

是否还有下一页

示例:

true

最后修改于 2026年6月22日