查询镜像列表
curl --request GET \
--url https://api.ppio.com/gpus/v2/images \
--header 'Authorization: <authorization>'import requests
url = "https://api.ppio.com/gpus/v2/images"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.ppio.com/gpus/v2/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ppio.com/gpus/v2/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ppio.com/gpus/v2/images"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ppio.com/gpus/v2/images")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpus/v2/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "image-id",
"name": "pytorch",
"image": "registry.example.com/base/pytorch",
"type": "private",
"status": {
"status": "normal",
"error": "",
"message": ""
},
"created_at": 1714982400,
"tags": [
{
"id": "tag-id",
"tag": "2.3.0-cuda12.1",
"owner_id": "550e8400-e29b-41d4-a716-446655440000",
"full_image_name": "registry.example.com/base/pytorch:2.3.0-cuda12.1"
}
]
}
],
"next_cursor": "eyJpZCI6Im5leHQtcGFnZSJ9",
"has_more": true
}镜像
查询镜像列表
GET
/
gpus
/
v2
/
images
查询镜像列表
curl --request GET \
--url https://api.ppio.com/gpus/v2/images \
--header 'Authorization: <authorization>'import requests
url = "https://api.ppio.com/gpus/v2/images"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.ppio.com/gpus/v2/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ppio.com/gpus/v2/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ppio.com/gpus/v2/images"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ppio.com/gpus/v2/images")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpus/v2/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "image-id",
"name": "pytorch",
"image": "registry.example.com/base/pytorch",
"type": "private",
"status": {
"status": "normal",
"error": "",
"message": ""
},
"created_at": 1714982400,
"tags": [
{
"id": "tag-id",
"tag": "2.3.0-cuda12.1",
"owner_id": "550e8400-e29b-41d4-a716-446655440000",
"full_image_name": "registry.example.com/base/pytorch:2.3.0-cuda12.1"
}
]
}
],
"next_cursor": "eyJpZCI6Im5leHQtcGFnZSJ9",
"has_more": true
}请求头
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
查询参数
镜像类型过滤。可选值:base、community、private。留空字符串时不过滤。
可用选项:
base, community, private 镜像名称过滤。字符串,长度限制:0-255 字符。
本次返回数量上限。整数,取值 >= 0。
上一页响应返回的游标,首次请求留空。字符串,长度限制:0-1024 字符。
最后修改于 2026年6月22日
⌘I