Update Endpoint
curl --request POST \
--url https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"id": "<string>",
"name": "<string>",
"clusterID": "<string>",
"workerConfig": {
"minNum": 123,
"maxNum": 123,
"freeTimeout": 123,
"maxConcurrent": 123,
"gpuNum": 123,
"requestTimeout": 123
},
"ports": [
{
"port": "<string>"
}
],
"policy": {
"type": "<string>",
"value": 123
},
"image": {
"image": "<string>",
"authId": "<string>",
"command": "<string>"
},
"volumeMounts": [
{
"type": "<string>",
"size": 123,
"id": "<string>",
"mountPath": "<string>"
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"healthy": {
"path": "<string>"
}
}
'import requests
url = "https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update"
payload = {
"id": "<string>",
"name": "<string>",
"clusterID": "<string>",
"workerConfig": {
"minNum": 123,
"maxNum": 123,
"freeTimeout": 123,
"maxConcurrent": 123,
"gpuNum": 123,
"requestTimeout": 123
},
"ports": [{ "port": "<string>" }],
"policy": {
"type": "<string>",
"value": 123
},
"image": {
"image": "<string>",
"authId": "<string>",
"command": "<string>"
},
"volumeMounts": [
{
"type": "<string>",
"size": 123,
"id": "<string>",
"mountPath": "<string>"
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"healthy": { "path": "<string>" }
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
clusterID: '<string>',
workerConfig: {
minNum: 123,
maxNum: 123,
freeTimeout: 123,
maxConcurrent: 123,
gpuNum: 123,
requestTimeout: 123
},
ports: [{port: '<string>'}],
policy: {type: '<string>', value: 123},
image: {image: '<string>', authId: '<string>', command: '<string>'},
volumeMounts: [{type: '<string>', size: 123, id: '<string>', mountPath: '<string>'}],
envs: [{key: '<string>', value: '<string>'}],
healthy: {path: '<string>'}
})
};
fetch('https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update', 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/gpu-instance/openapi/v1/endpoint/update",
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([
'id' => '<string>',
'name' => '<string>',
'clusterID' => '<string>',
'workerConfig' => [
'minNum' => 123,
'maxNum' => 123,
'freeTimeout' => 123,
'maxConcurrent' => 123,
'gpuNum' => 123,
'requestTimeout' => 123
],
'ports' => [
[
'port' => '<string>'
]
],
'policy' => [
'type' => '<string>',
'value' => 123
],
'image' => [
'image' => '<string>',
'authId' => '<string>',
'command' => '<string>'
],
'volumeMounts' => [
[
'type' => '<string>',
'size' => 123,
'id' => '<string>',
'mountPath' => '<string>'
]
],
'envs' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'healthy' => [
'path' => '<string>'
]
]),
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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"clusterID\": \"<string>\",\n \"workerConfig\": {\n \"minNum\": 123,\n \"maxNum\": 123,\n \"freeTimeout\": 123,\n \"maxConcurrent\": 123,\n \"gpuNum\": 123,\n \"requestTimeout\": 123\n },\n \"ports\": [\n {\n \"port\": \"<string>\"\n }\n ],\n \"policy\": {\n \"type\": \"<string>\",\n \"value\": 123\n },\n \"image\": {\n \"image\": \"<string>\",\n \"authId\": \"<string>\",\n \"command\": \"<string>\"\n },\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"size\": 123,\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"healthy\": {\n \"path\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"clusterID\": \"<string>\",\n \"workerConfig\": {\n \"minNum\": 123,\n \"maxNum\": 123,\n \"freeTimeout\": 123,\n \"maxConcurrent\": 123,\n \"gpuNum\": 123,\n \"requestTimeout\": 123\n },\n \"ports\": [\n {\n \"port\": \"<string>\"\n }\n ],\n \"policy\": {\n \"type\": \"<string>\",\n \"value\": 123\n },\n \"image\": {\n \"image\": \"<string>\",\n \"authId\": \"<string>\",\n \"command\": \"<string>\"\n },\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"size\": 123,\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"healthy\": {\n \"path\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"clusterID\": \"<string>\",\n \"workerConfig\": {\n \"minNum\": 123,\n \"maxNum\": 123,\n \"freeTimeout\": 123,\n \"maxConcurrent\": 123,\n \"gpuNum\": 123,\n \"requestTimeout\": 123\n },\n \"ports\": [\n {\n \"port\": \"<string>\"\n }\n ],\n \"policy\": {\n \"type\": \"<string>\",\n \"value\": 123\n },\n \"image\": {\n \"image\": \"<string>\",\n \"authId\": \"<string>\",\n \"command\": \"<string>\"\n },\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"size\": 123,\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"healthy\": {\n \"path\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyServerless GPUs
Update Endpoint
POST
/
gpu-instance
/
openapi
/
v1
/
endpoint
/
update
Update Endpoint
curl --request POST \
--url https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"id": "<string>",
"name": "<string>",
"clusterID": "<string>",
"workerConfig": {
"minNum": 123,
"maxNum": 123,
"freeTimeout": 123,
"maxConcurrent": 123,
"gpuNum": 123,
"requestTimeout": 123
},
"ports": [
{
"port": "<string>"
}
],
"policy": {
"type": "<string>",
"value": 123
},
"image": {
"image": "<string>",
"authId": "<string>",
"command": "<string>"
},
"volumeMounts": [
{
"type": "<string>",
"size": 123,
"id": "<string>",
"mountPath": "<string>"
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"healthy": {
"path": "<string>"
}
}
'import requests
url = "https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update"
payload = {
"id": "<string>",
"name": "<string>",
"clusterID": "<string>",
"workerConfig": {
"minNum": 123,
"maxNum": 123,
"freeTimeout": 123,
"maxConcurrent": 123,
"gpuNum": 123,
"requestTimeout": 123
},
"ports": [{ "port": "<string>" }],
"policy": {
"type": "<string>",
"value": 123
},
"image": {
"image": "<string>",
"authId": "<string>",
"command": "<string>"
},
"volumeMounts": [
{
"type": "<string>",
"size": 123,
"id": "<string>",
"mountPath": "<string>"
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"healthy": { "path": "<string>" }
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
clusterID: '<string>',
workerConfig: {
minNum: 123,
maxNum: 123,
freeTimeout: 123,
maxConcurrent: 123,
gpuNum: 123,
requestTimeout: 123
},
ports: [{port: '<string>'}],
policy: {type: '<string>', value: 123},
image: {image: '<string>', authId: '<string>', command: '<string>'},
volumeMounts: [{type: '<string>', size: 123, id: '<string>', mountPath: '<string>'}],
envs: [{key: '<string>', value: '<string>'}],
healthy: {path: '<string>'}
})
};
fetch('https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update', 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/gpu-instance/openapi/v1/endpoint/update",
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([
'id' => '<string>',
'name' => '<string>',
'clusterID' => '<string>',
'workerConfig' => [
'minNum' => 123,
'maxNum' => 123,
'freeTimeout' => 123,
'maxConcurrent' => 123,
'gpuNum' => 123,
'requestTimeout' => 123
],
'ports' => [
[
'port' => '<string>'
]
],
'policy' => [
'type' => '<string>',
'value' => 123
],
'image' => [
'image' => '<string>',
'authId' => '<string>',
'command' => '<string>'
],
'volumeMounts' => [
[
'type' => '<string>',
'size' => 123,
'id' => '<string>',
'mountPath' => '<string>'
]
],
'envs' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'healthy' => [
'path' => '<string>'
]
]),
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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"clusterID\": \"<string>\",\n \"workerConfig\": {\n \"minNum\": 123,\n \"maxNum\": 123,\n \"freeTimeout\": 123,\n \"maxConcurrent\": 123,\n \"gpuNum\": 123,\n \"requestTimeout\": 123\n },\n \"ports\": [\n {\n \"port\": \"<string>\"\n }\n ],\n \"policy\": {\n \"type\": \"<string>\",\n \"value\": 123\n },\n \"image\": {\n \"image\": \"<string>\",\n \"authId\": \"<string>\",\n \"command\": \"<string>\"\n },\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"size\": 123,\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"healthy\": {\n \"path\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"clusterID\": \"<string>\",\n \"workerConfig\": {\n \"minNum\": 123,\n \"maxNum\": 123,\n \"freeTimeout\": 123,\n \"maxConcurrent\": 123,\n \"gpuNum\": 123,\n \"requestTimeout\": 123\n },\n \"ports\": [\n {\n \"port\": \"<string>\"\n }\n ],\n \"policy\": {\n \"type\": \"<string>\",\n \"value\": 123\n },\n \"image\": {\n \"image\": \"<string>\",\n \"authId\": \"<string>\",\n \"command\": \"<string>\"\n },\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"size\": 123,\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"healthy\": {\n \"path\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/gpu-instance/openapi/v1/endpoint/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"clusterID\": \"<string>\",\n \"workerConfig\": {\n \"minNum\": 123,\n \"maxNum\": 123,\n \"freeTimeout\": 123,\n \"maxConcurrent\": 123,\n \"gpuNum\": 123,\n \"requestTimeout\": 123\n },\n \"ports\": [\n {\n \"port\": \"<string>\"\n }\n ],\n \"policy\": {\n \"type\": \"<string>\",\n \"value\": 123\n },\n \"image\": {\n \"image\": \"<string>\",\n \"authId\": \"<string>\",\n \"command\": \"<string>\"\n },\n \"volumeMounts\": [\n {\n \"type\": \"<string>\",\n \"size\": 123,\n \"id\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"envs\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"healthy\": {\n \"path\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyDescription
When updating an endpoint, all parameters must be provided in full.Request Headers
string
requis
Enum:
application/jsonstring
requis
Bearer authentication format, for example: Bearer {{API Key}}.
Request Body
string
requis
The Endpoint ID to update.
string
Endpoint name.
string
Cluster information. Required when mounting cloud storage and must match the cluster ID where the cloud storage is located. String with a length limit of 0-255 characters.
object
requis
Worker configuration. The valid range is dynamically retrieved through the parameter limits API.
object[]
requis
HTTP ports. Only one port is supported. Supported port range: 1-65535, excluding internal ports 2222, 2223, and 2224.
Afficher properties
Afficher properties
string
requis
HTTP port.
object
requis
Scaling policy. The valid range is dynamically retrieved through the parameter limits API.
Afficher properties
Afficher properties
string
requis
Scaling policy type. Available values:
queue: Queue latency policy, scales workers based on request wait time in the queue.concurrency: Queue request policy, scales workers based on the number of requests in the queue.
integer
requis
The meaning of value depends on the type:
- When type = queue, value represents the queue wait time in seconds.
- When type = concurrency, value represents the maximum number of requests in the queue.
object
requis
Container image configuration.
Afficher properties
Afficher properties
object[]
Storage configuration in GB.
Afficher properties
Afficher properties
string
requis
Storage type. Available values:
local: Local storage.network: Network storage.
integer
Local storage size, currently fixed at 30. Not required for network storage.
string
Network storage ID. Not required for local storage.
string
requis
Storage mount path. String with a length limit of 0-255 characters.
object[]
Dernière modification le 15 mai 2026
⌘I