# Create Image Prewarm Task - Documentation

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown is available with `Accept: text/markdown` and `.md` URL variants.

Source: /docs/api-reference/gpu-instance-create-image-prewarm

# Create Image Prewarm Task

POST

/

gpu-instance

/

openapi

/

v1

/

image

/

prewarm

Try it

Create Image Prewarm Task

cURL

```
curl --request POST \
--url https://api.novita.ai/gpu-instance/openapi/v1/image/prewarm \
--header 'Authorization: ' \
--header 'Content-Type: ' \
--data '
{
"imageUrl": "",
"repositoryAuth": "",
"clusterId": "",
"productIds": [
""
],
"note": ""
}
'
```

```
import requests

url = "https://api.novita.ai/gpu-instance/openapi/v1/image/prewarm"

payload = {
"imageUrl": "",
"repositoryAuth": "",
"clusterId": "",
"productIds": [""],
"note": ""
}
headers = {
"Content-Type": "",
"Authorization": ""
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

```
const options = {
method: 'POST',
headers: {'Content-Type': '', Authorization: ''},
body: JSON.stringify({
imageUrl: '',
repositoryAuth: '',
clusterId: '',
productIds: [''],
note: ''
})
};

fetch('https://api.novita.ai/gpu-instance/openapi/v1/image/prewarm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
```

```
"https://api.novita.ai/gpu-instance/openapi/v1/image/prewarm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'imageUrl' => '',
'repositoryAuth' => '',
'clusterId' => '',
'productIds' => [
''
],
'note' => ''
]),
CURLOPT_HTTPHEADER => [
"Authorization: ",
"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"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.novita.ai/gpu-instance/openapi/v1/image/prewarm"

payload := strings.NewReader("{\n \"imageUrl\": \"\",\n \"repositoryAuth\": \"\",\n \"clusterId\": \"\",\n \"productIds\": [\n \"\"\n ],\n \"note\": \"\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "")
req.Header.Add("Authorization", "")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
```

```
HttpResponse response = Unirest.post("https://api.novita.ai/gpu-instance/openapi/v1/image/prewarm")
.header("Content-Type", "")
.header("Authorization", "")
.body("{\n \"imageUrl\": \"\",\n \"repositoryAuth\": \"\",\n \"clusterId\": \"\",\n \"productIds\": [\n \"\"\n ],\n \"note\": \"\"\n}")
.asString();
```

```
require 'uri'
require 'net/http'

url = URI("https://api.novita.ai/gpu-instance/openapi/v1/image/prewarm")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = ''
request["Authorization"] = ''
request.body = "{\n \"imageUrl\": \"\",\n \"repositoryAuth\": \"\",\n \"clusterId\": \"\",\n \"productIds\": [\n \"\"\n ],\n \"note\": \"\"\n}"

response = http.request(request)
puts response.read_body
```

200

```
{
"id": ""
}
```

##

[​](#request-headers)

Request Headers

[​](#param-content-type)

Content-Type

string

required

Enum: `application/json`

[​](#param-authorization)

Authorization

string

required

Bearer authentication format, for example: Bearer {{API Key}}.

##

[​](#request-body)

Request Body

[​](#param-image-url)

imageUrl

string

required

Image address to prewarm.

[​](#param-repository-auth)

repositoryAuth

string

Image registry authentication ID. Required only for private registries.

[​](#param-cluster-id)

clusterId

string

required

Cluster ID where the image should be prewarmed.

[​](#param-product-ids)

productIds

string[]

Product IDs to prewarm on. Leave empty to prewarm globally in the cluster.

[​](#param-note)

note

string

Task note or description.

##

[​](#response)

Response

[​](#param-id)

id

string

required

Created prewarm task ID.

Last modified on September 15, 2025
