获取镜像预热配额信息
curl --request GET \
--url https://api.ppio.com/gpu-instance/openapi/v1/image/prewarm/quota \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.ppio.com/gpu-instance/openapi/v1/image/prewarm/quota"
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};
fetch('https://api.ppio.com/gpu-instance/openapi/v1/image/prewarm/quota', 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/image/prewarm/quota",
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>",
"Content-Type: <content-type>"
],
]);
$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/image/prewarm/quota"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
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/image/prewarm/quota")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpu-instance/openapi/v1/image/prewarm/quota")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"total": 123,
"limit": 123,
"perImageSize": 123
}镜像
获取镜像预热配额信息
GET
/
gpu-instance
/
openapi
/
v1
/
image
/
prewarm
/
quota
获取镜像预热配额信息
curl --request GET \
--url https://api.ppio.com/gpu-instance/openapi/v1/image/prewarm/quota \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.ppio.com/gpu-instance/openapi/v1/image/prewarm/quota"
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};
fetch('https://api.ppio.com/gpu-instance/openapi/v1/image/prewarm/quota', 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/image/prewarm/quota",
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>",
"Content-Type: <content-type>"
],
]);
$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/image/prewarm/quota"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
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/image/prewarm/quota")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpu-instance/openapi/v1/image/prewarm/quota")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"total": 123,
"limit": 123,
"perImageSize": 123
}请求头
枚举值:application/json。
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
示例
curl --location --request GET 'https://api.ppio.com/gpu-instance/openapi/v1/image/prewarm/quota' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{API_KEY}}'
响应参数
已创建的预热任务数。
最大可创建的预热任务数。
单个镜像允许的最大大小(GB)。
响应示例
{
"total": 2,
"limit": 5,
"perImageSize": 100
}
最后修改于 2026年1月12日
⌘I