Resize compute instance in place
curl --request POST \
--url https://compute.x402layer.cc/compute/instances/{id}/resize \
--header 'Content-Type: application/json' \
--data '
{
"plan": "<string>",
"confirm_disk_resize": true
}
'import requests
url = "https://compute.x402layer.cc/compute/instances/{id}/resize"
payload = {
"plan": "<string>",
"confirm_disk_resize": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({plan: '<string>', confirm_disk_resize: true})
};
fetch('https://compute.x402layer.cc/compute/instances/{id}/resize', 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://compute.x402layer.cc/compute/instances/{id}/resize",
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([
'plan' => '<string>',
'confirm_disk_resize' => true
]),
CURLOPT_HTTPHEADER => [
"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://compute.x402layer.cc/compute/instances/{id}/resize"
payload := strings.NewReader("{\n \"plan\": \"<string>\",\n \"confirm_disk_resize\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://compute.x402layer.cc/compute/instances/{id}/resize")
.header("Content-Type", "application/json")
.body("{\n \"plan\": \"<string>\",\n \"confirm_disk_resize\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.x402layer.cc/compute/instances/{id}/resize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan\": \"<string>\",\n \"confirm_disk_resize\": true\n}"
response = http.request(request)
puts response.read_bodySingularity Compute
Resize compute instance
Resizes an active instance on its current provider. The route preserves the remaining prepaid dollar credit and recalculates expiry for the target hourly rate.
POST
/
compute
/
instances
/
{id}
/
resize
Resize compute instance in place
curl --request POST \
--url https://compute.x402layer.cc/compute/instances/{id}/resize \
--header 'Content-Type: application/json' \
--data '
{
"plan": "<string>",
"confirm_disk_resize": true
}
'import requests
url = "https://compute.x402layer.cc/compute/instances/{id}/resize"
payload = {
"plan": "<string>",
"confirm_disk_resize": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({plan: '<string>', confirm_disk_resize: true})
};
fetch('https://compute.x402layer.cc/compute/instances/{id}/resize', 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://compute.x402layer.cc/compute/instances/{id}/resize",
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([
'plan' => '<string>',
'confirm_disk_resize' => true
]),
CURLOPT_HTTPHEADER => [
"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://compute.x402layer.cc/compute/instances/{id}/resize"
payload := strings.NewReader("{\n \"plan\": \"<string>\",\n \"confirm_disk_resize\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://compute.x402layer.cc/compute/instances/{id}/resize")
.header("Content-Type", "application/json")
.body("{\n \"plan\": \"<string>\",\n \"confirm_disk_resize\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.x402layer.cc/compute/instances/{id}/resize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan\": \"<string>\",\n \"confirm_disk_resize\": true\n}"
response = http.request(request)
puts response.read_bodyResize an active Singularity Compute instance in place on its current provider.
Use this route when you want to move an instance to a larger compatible plan without provisioning a second machine.
Behavior
- Requires compute management auth (
X-Auth-*orX-API-Key) - Does not create a new x402 or MPP payment challenge
- Preserves the remaining prepaid dollar credit and recalculates
expires_atfor the new hourly rate - Keeps the instance on the same provider and same region
Provider rules
- Vultr resizes are upgrade-only
- DigitalOcean disk growth is irreversible and requires
confirm_disk_resize: true - Expect downtime during the resize window
Related endpoints
GET /compute/plansGET /compute/instances/{id}POST /compute/instances/{id}/extend
Path Parameters
Body
application/json
Response
Resize started
Was this page helpful?
