curl --request PUT \
--url https://console.vast.ai/api/v0/endptjobs/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"min_load": 0,
"min_cold_load": 0.05,
"target_util": 0.9,
"cold_mult": 2.5,
"cold_workers": 5,
"max_workers": 20,
"max_queue_time": 90,
"target_queue_time": 15,
"endpoint_name": "my_endpoint",
"autoscaler_instance": "prod",
"endpoint_state": "active",
"inactivity_timeout": 600,
"overrecruit_ratio": 1.3
}
'import requests
url = "https://console.vast.ai/api/v0/endptjobs/{id}/"
payload = {
"min_load": 0,
"min_cold_load": 0.05,
"target_util": 0.9,
"cold_mult": 2.5,
"cold_workers": 5,
"max_workers": 20,
"max_queue_time": 90,
"target_queue_time": 15,
"endpoint_name": "my_endpoint",
"autoscaler_instance": "prod",
"endpoint_state": "active",
"inactivity_timeout": 600,
"overrecruit_ratio": 1.3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
min_load: 0,
min_cold_load: 0.05,
target_util: 0.9,
cold_mult: 2.5,
cold_workers: 5,
max_workers: 20,
max_queue_time: 90,
target_queue_time: 15,
endpoint_name: 'my_endpoint',
autoscaler_instance: 'prod',
endpoint_state: 'active',
inactivity_timeout: 600,
overrecruit_ratio: 1.3
})
};
fetch('https://console.vast.ai/api/v0/endptjobs/{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://console.vast.ai/api/v0/endptjobs/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'min_load' => 0,
'min_cold_load' => 0.05,
'target_util' => 0.9,
'cold_mult' => 2.5,
'cold_workers' => 5,
'max_workers' => 20,
'max_queue_time' => 90,
'target_queue_time' => 15,
'endpoint_name' => 'my_endpoint',
'autoscaler_instance' => 'prod',
'endpoint_state' => 'active',
'inactivity_timeout' => 600,
'overrecruit_ratio' => 1.3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://console.vast.ai/api/v0/endptjobs/{id}/"
payload := strings.NewReader("{\n \"min_load\": 0,\n \"min_cold_load\": 0.05,\n \"target_util\": 0.9,\n \"cold_mult\": 2.5,\n \"cold_workers\": 5,\n \"max_workers\": 20,\n \"max_queue_time\": 90,\n \"target_queue_time\": 15,\n \"endpoint_name\": \"my_endpoint\",\n \"autoscaler_instance\": \"prod\",\n \"endpoint_state\": \"active\",\n \"inactivity_timeout\": 600,\n \"overrecruit_ratio\": 1.3\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://console.vast.ai/api/v0/endptjobs/{id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"min_load\": 0,\n \"min_cold_load\": 0.05,\n \"target_util\": 0.9,\n \"cold_mult\": 2.5,\n \"cold_workers\": 5,\n \"max_workers\": 20,\n \"max_queue_time\": 90,\n \"target_queue_time\": 15,\n \"endpoint_name\": \"my_endpoint\",\n \"autoscaler_instance\": \"prod\",\n \"endpoint_state\": \"active\",\n \"inactivity_timeout\": 600,\n \"overrecruit_ratio\": 1.3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v0/endptjobs/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"min_load\": 0,\n \"min_cold_load\": 0.05,\n \"target_util\": 0.9,\n \"cold_mult\": 2.5,\n \"cold_workers\": 5,\n \"max_workers\": 20,\n \"max_queue_time\": 90,\n \"target_queue_time\": 15,\n \"endpoint_name\": \"my_endpoint\",\n \"autoscaler_instance\": \"prod\",\n \"endpoint_state\": \"active\",\n \"inactivity_timeout\": 600,\n \"overrecruit_ratio\": 1.3\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "<string>",
"msg": "<string>"
}{
"error": "<string>",
"msg": "<string>"
}Update Endpoint
Updates autoscaling configuration on an existing endpoint; endpoint must not be managed by a deployment.
curl --request PUT \
--url https://console.vast.ai/api/v0/endptjobs/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"min_load": 0,
"min_cold_load": 0.05,
"target_util": 0.9,
"cold_mult": 2.5,
"cold_workers": 5,
"max_workers": 20,
"max_queue_time": 90,
"target_queue_time": 15,
"endpoint_name": "my_endpoint",
"autoscaler_instance": "prod",
"endpoint_state": "active",
"inactivity_timeout": 600,
"overrecruit_ratio": 1.3
}
'import requests
url = "https://console.vast.ai/api/v0/endptjobs/{id}/"
payload = {
"min_load": 0,
"min_cold_load": 0.05,
"target_util": 0.9,
"cold_mult": 2.5,
"cold_workers": 5,
"max_workers": 20,
"max_queue_time": 90,
"target_queue_time": 15,
"endpoint_name": "my_endpoint",
"autoscaler_instance": "prod",
"endpoint_state": "active",
"inactivity_timeout": 600,
"overrecruit_ratio": 1.3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
min_load: 0,
min_cold_load: 0.05,
target_util: 0.9,
cold_mult: 2.5,
cold_workers: 5,
max_workers: 20,
max_queue_time: 90,
target_queue_time: 15,
endpoint_name: 'my_endpoint',
autoscaler_instance: 'prod',
endpoint_state: 'active',
inactivity_timeout: 600,
overrecruit_ratio: 1.3
})
};
fetch('https://console.vast.ai/api/v0/endptjobs/{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://console.vast.ai/api/v0/endptjobs/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'min_load' => 0,
'min_cold_load' => 0.05,
'target_util' => 0.9,
'cold_mult' => 2.5,
'cold_workers' => 5,
'max_workers' => 20,
'max_queue_time' => 90,
'target_queue_time' => 15,
'endpoint_name' => 'my_endpoint',
'autoscaler_instance' => 'prod',
'endpoint_state' => 'active',
'inactivity_timeout' => 600,
'overrecruit_ratio' => 1.3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://console.vast.ai/api/v0/endptjobs/{id}/"
payload := strings.NewReader("{\n \"min_load\": 0,\n \"min_cold_load\": 0.05,\n \"target_util\": 0.9,\n \"cold_mult\": 2.5,\n \"cold_workers\": 5,\n \"max_workers\": 20,\n \"max_queue_time\": 90,\n \"target_queue_time\": 15,\n \"endpoint_name\": \"my_endpoint\",\n \"autoscaler_instance\": \"prod\",\n \"endpoint_state\": \"active\",\n \"inactivity_timeout\": 600,\n \"overrecruit_ratio\": 1.3\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://console.vast.ai/api/v0/endptjobs/{id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"min_load\": 0,\n \"min_cold_load\": 0.05,\n \"target_util\": 0.9,\n \"cold_mult\": 2.5,\n \"cold_workers\": 5,\n \"max_workers\": 20,\n \"max_queue_time\": 90,\n \"target_queue_time\": 15,\n \"endpoint_name\": \"my_endpoint\",\n \"autoscaler_instance\": \"prod\",\n \"endpoint_state\": \"active\",\n \"inactivity_timeout\": 600,\n \"overrecruit_ratio\": 1.3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v0/endptjobs/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"min_load\": 0,\n \"min_cold_load\": 0.05,\n \"target_util\": 0.9,\n \"cold_mult\": 2.5,\n \"cold_workers\": 5,\n \"max_workers\": 20,\n \"max_queue_time\": 90,\n \"target_queue_time\": 15,\n \"endpoint_name\": \"my_endpoint\",\n \"autoscaler_instance\": \"prod\",\n \"endpoint_state\": \"active\",\n \"inactivity_timeout\": 600,\n \"overrecruit_ratio\": 1.3\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "<string>",
"msg": "<string>"
}{
"error": "<string>",
"msg": "<string>"
}Authorizations
API key must be provided in the Authorization header
Path Parameters
ID of the endpoint group to update
Body
Minimum floor load in perf units/s (token/s for LLMs)
0
Updated minimum cold load threshold.
0.05
Target capacity utilization (fraction, max 1.0)
0.9
Cold/stopped instance capacity target as multiple of hot capacity target
2.5
Min number of workers to keep 'cold' when you have no load
5
Max number of workers your endpoint group can have
20
Updated maximum acceptable queue time in seconds.
90
Updated desired queue time in seconds; must be <= max_queue_time.
15
Deployment endpoint name
"my_endpoint"
Autoscaler deployment environment.
"prod"
New activation state for the endpoint.
active, suspended, stopped "active"
Updated seconds of inactivity before suspension.
600
Updated over-recruit ratio for traffic spike absorption.
1.3
Response
Returns {success: true}
Always true on success.