Modify instance
curl --request POST \
--url https://api.thundercompute.com:8443/v1/instances/{id}/modify \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"add_ports": [
123
],
"cpu_cores": 123,
"disk_size_gb": 123,
"gpu_type": "<string>",
"num_gpus": 123,
"remove_ports": [
123
]
}
'import requests
url = "https://api.thundercompute.com:8443/v1/instances/{id}/modify"
payload = {
"add_ports": [123],
"cpu_cores": 123,
"disk_size_gb": 123,
"gpu_type": "<string>",
"num_gpus": 123,
"remove_ports": [123]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
add_ports: [123],
cpu_cores: 123,
disk_size_gb: 123,
gpu_type: '<string>',
num_gpus: 123,
remove_ports: [123]
})
};
fetch('https://api.thundercompute.com:8443/v1/instances/{id}/modify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8443",
CURLOPT_URL => "https://api.thundercompute.com:8443/v1/instances/{id}/modify",
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([
'add_ports' => [
123
],
'cpu_cores' => 123,
'disk_size_gb' => 123,
'gpu_type' => '<string>',
'num_gpus' => 123,
'remove_ports' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.thundercompute.com:8443/v1/instances/{id}/modify"
payload := strings.NewReader("{\n \"add_ports\": [\n 123\n ],\n \"cpu_cores\": 123,\n \"disk_size_gb\": 123,\n \"gpu_type\": \"<string>\",\n \"num_gpus\": 123,\n \"remove_ports\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.post("https://api.thundercompute.com:8443/v1/instances/{id}/modify")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"add_ports\": [\n 123\n ],\n \"cpu_cores\": 123,\n \"disk_size_gb\": 123,\n \"gpu_type\": \"<string>\",\n \"num_gpus\": 123,\n \"remove_ports\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thundercompute.com:8443/v1/instances/{id}/modify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"add_ports\": [\n 123\n ],\n \"cpu_cores\": 123,\n \"disk_size_gb\": 123,\n \"gpu_type\": \"<string>\",\n \"num_gpus\": 123,\n \"remove_ports\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"identifier": "<string>",
"instance_name": "<string>",
"gpu_type": "<string>",
"num_gpus": 123
}{
"code": 400,
"error": "invalid_request",
"message": "The request is malformed"
}{
"code": 400,
"error": "invalid_request",
"message": "The request is malformed"
}{
"code": 400,
"error": "invalid_request",
"message": "The request is malformed"
}{
"code": 400,
"error": "invalid_request",
"message": "The request is malformed"
}Instances
Modify instance
Modify a running compute instance’s resources The optional mode field is retained for legacy compatibility. If supplied, routing is derived from the requested or existing GPU count, not the mode value. New integrations should omit mode and configure resources using GPU type, GPU count, CPU, and storage.
POST
/
instances
/
{id}
/
modify
Modify instance
curl --request POST \
--url https://api.thundercompute.com:8443/v1/instances/{id}/modify \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"add_ports": [
123
],
"cpu_cores": 123,
"disk_size_gb": 123,
"gpu_type": "<string>",
"num_gpus": 123,
"remove_ports": [
123
]
}
'import requests
url = "https://api.thundercompute.com:8443/v1/instances/{id}/modify"
payload = {
"add_ports": [123],
"cpu_cores": 123,
"disk_size_gb": 123,
"gpu_type": "<string>",
"num_gpus": 123,
"remove_ports": [123]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
add_ports: [123],
cpu_cores: 123,
disk_size_gb: 123,
gpu_type: '<string>',
num_gpus: 123,
remove_ports: [123]
})
};
fetch('https://api.thundercompute.com:8443/v1/instances/{id}/modify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8443",
CURLOPT_URL => "https://api.thundercompute.com:8443/v1/instances/{id}/modify",
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([
'add_ports' => [
123
],
'cpu_cores' => 123,
'disk_size_gb' => 123,
'gpu_type' => '<string>',
'num_gpus' => 123,
'remove_ports' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.thundercompute.com:8443/v1/instances/{id}/modify"
payload := strings.NewReader("{\n \"add_ports\": [\n 123\n ],\n \"cpu_cores\": 123,\n \"disk_size_gb\": 123,\n \"gpu_type\": \"<string>\",\n \"num_gpus\": 123,\n \"remove_ports\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.post("https://api.thundercompute.com:8443/v1/instances/{id}/modify")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"add_ports\": [\n 123\n ],\n \"cpu_cores\": 123,\n \"disk_size_gb\": 123,\n \"gpu_type\": \"<string>\",\n \"num_gpus\": 123,\n \"remove_ports\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thundercompute.com:8443/v1/instances/{id}/modify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"add_ports\": [\n 123\n ],\n \"cpu_cores\": 123,\n \"disk_size_gb\": 123,\n \"gpu_type\": \"<string>\",\n \"num_gpus\": 123,\n \"remove_ports\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"identifier": "<string>",
"instance_name": "<string>",
"gpu_type": "<string>",
"num_gpus": 123
}{
"code": 400,
"error": "invalid_request",
"message": "The request is malformed"
}{
"code": 400,
"error": "invalid_request",
"message": "The request is malformed"
}{
"code": 400,
"error": "invalid_request",
"message": "The request is malformed"
}{
"code": 400,
"error": "invalid_request",
"message": "The request is malformed"
}Authorizations
Bearer token authentication. Provide your API token prefixed with "Bearer ", e.g. "Bearer your-api-token".
Path Parameters
Instance ID (index)
Body
application/json
Instance modification parameters
Instance modification parameters
Deprecated: retained for legacy compatibility. Omit in new integrations. Behavior is specific to each endpoint; see its operation description.
Available options:
prototyping, production Was this page helpful?