Get Image Prewarm Task
curl --request GET \
--url https://api.novita.ai/gpus/v2/prewarm-tasks/{task_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.novita.ai/gpus/v2/prewarm-tasks/{task_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.novita.ai/gpus/v2/prewarm-tasks/{task_id}', 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.novita.ai/gpus/v2/prewarm-tasks/{task_id}",
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.novita.ai/gpus/v2/prewarm-tasks/{task_id}"
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.novita.ai/gpus/v2/prewarm-tasks/{task_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/gpus/v2/prewarm-tasks/{task_id}")
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{
"task_id": "prewarm-task-id",
"name": "image:tag",
"image": "registry.example.com/team/image:tag",
"region_id": "region-a",
"product_ids": [
"product-a"
],
"image_size": 10737418240,
"created_at": 1714982400,
"completed_at": 0,
"status": {
"status": "running",
"error": "",
"message": ""
},
"registry_auth_id": "registry-auth-id",
"note": "",
"reason": [
""
]
}Image
Get Image Prewarm Task
GET
/
gpus
/
v2
/
prewarm-tasks
/
{task_id}
Get Image Prewarm Task
curl --request GET \
--url https://api.novita.ai/gpus/v2/prewarm-tasks/{task_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.novita.ai/gpus/v2/prewarm-tasks/{task_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.novita.ai/gpus/v2/prewarm-tasks/{task_id}', 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.novita.ai/gpus/v2/prewarm-tasks/{task_id}",
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.novita.ai/gpus/v2/prewarm-tasks/{task_id}"
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.novita.ai/gpus/v2/prewarm-tasks/{task_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/gpus/v2/prewarm-tasks/{task_id}")
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{
"task_id": "prewarm-task-id",
"name": "image:tag",
"image": "registry.example.com/team/image:tag",
"region_id": "region-a",
"product_ids": [
"product-a"
],
"image_size": 10737418240,
"created_at": 1714982400,
"completed_at": 0,
"status": {
"status": "running",
"error": "",
"message": ""
},
"registry_auth_id": "registry-auth-id",
"note": "",
"reason": [
""
]
}En-têtes
Bearer authentication format, e.g.: Bearer {{API_KEY}}.
Paramètres de chemin
Image prewarm task ID. String, length: 1-255 characters.
Réponse
200 - application/json
OK
Image prewarm task ID
Exemple:
"prewarm-task-id"
Image name
Exemple:
"image:tag"
Image address
Exemple:
"registry.example.com/team/image:tag"
Region ID
Exemple:
"region-a"
Product IDs covered by prewarming
Exemple:
["product-a"]
Image size. Unit: bytes
Exemple:
10737418240
Creation time. Unix timestamp
Exemple:
1714982400
Completion time. Unix timestamp; 0 when not finished
Exemple:
0
Task status
Show child attributes
Show child attributes
Registry authentication ID
Exemple:
"registry-auth-id"
Note for the prewarm task
Exemple:
""
Reasons for prewarm failure
Exemple:
[""]
Dernière modification le 10 août 2026