获取 GPU 产品列表
curl --request GET \
--url https://api.ppio.com/gpu-instance/openapi/v1/products \
--header 'Authorization: <authorization>'import requests
url = "https://api.ppio.com/gpu-instance/openapi/v1/products"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.ppio.com/gpu-instance/openapi/v1/products', 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/gpu-instance/openapi/v1/products",
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/gpu-instance/openapi/v1/products"
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/gpu-instance/openapi/v1/products")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpu-instance/openapi/v1/products")
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": "<string>",
"name": "<string>",
"cpuPerGpu": 123,
"memoryPerGpu": 123,
"diskPerGpu": 123,
"availableDeploy": true,
"minRootFS": 123,
"maxRootFS": 123,
"minLocalStorage": 123,
"maxLocalStorage": 123,
"regions": {},
"price": 123,
"monthlyPrice": [
{
"price": 123,
"month": 123
}
],
"billingMethods": [
"<string>"
],
"spotPrice": "<string>",
"inventoryState": "<string>"
}
]
}产品
获取 GPU 产品列表
GET
/
gpu-instance
/
openapi
/
v1
/
products
获取 GPU 产品列表
curl --request GET \
--url https://api.ppio.com/gpu-instance/openapi/v1/products \
--header 'Authorization: <authorization>'import requests
url = "https://api.ppio.com/gpu-instance/openapi/v1/products"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.ppio.com/gpu-instance/openapi/v1/products', 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/gpu-instance/openapi/v1/products",
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/gpu-instance/openapi/v1/products"
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/gpu-instance/openapi/v1/products")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpu-instance/openapi/v1/products")
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": "<string>",
"name": "<string>",
"cpuPerGpu": 123,
"memoryPerGpu": 123,
"diskPerGpu": 123,
"availableDeploy": true,
"minRootFS": 123,
"maxRootFS": 123,
"minLocalStorage": 123,
"maxLocalStorage": 123,
"regions": {},
"price": 123,
"monthlyPrice": [
{
"price": 123,
"month": 123
}
],
"billingMethods": [
"<string>"
],
"spotPrice": "<string>",
"inventoryState": "<string>"
}
]
}请求头
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
查询参数
筛选指定集群ID。字符串,长度限制:0-255 字符。
筛选的显卡数量。整数,取值范围:[0, 8]。
筛选的产品名称(模糊匹配)。字符串,长度限制:0-255 字符。
筛选规格(最小可使用cpu 核/卡)。整数,取值范围:大于等于 0。
筛选规格(最小可使用内存 GB/卡)。整数,取值范围:大于等于 0。
筛选规格(最小可使用系统盘存储 GB/卡)。整数,取值范围:大于等于 0。
筛选计费模式。可选值:
onDemand: 按量计费实例(默认)monthly: 包年包月计费实例spot: 抢占式计费
响应参数
GPU 产品信息。
隐藏 properties
隐藏 properties
产品 ID。
产品名称。
CPU 数。单位为核/卡。
内存大小。单位为 GB/卡。
磁盘大小。单位为 GB/卡。
该产品是否可以创建实例。取值:
- true:产品可以创建实例。
- false::产品资源不足,不能创建实例。
系统盘可用最小值。单位为 GB。
系统盘可用最大值。单位为 GB。
本地盘可用最小值。单位为 GB。
本地盘可用最大值。单位为 GB。
可用集群。表示该产品仅在指定集群可用,如果列表为空,则所有集群均可使用。
该产品创建按量计费实例的价格。
该产品支持的计费方式。可选值:
onDemand:按量计费monthly:包年包月计费spot:抢占式计费
抢占式计费实例价格。
产品库存状态。
none:无库存low:库存较少normal:库存一般high:库存充足
最后修改于 2026年6月16日
⌘I