Python (SDK)
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.plans.list_vm_plans()
# Handle response
print(res)package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Plans.VM.List(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.VirtualMachinePlans != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.plans.vm.list();
console.log(result);
}
run();curl --request GET \
--url https://api.latitude.sh/plans/virtual_machines \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/plans/virtual_machines', 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.latitude.sh/plans/virtual_machines",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.latitude.sh/plans/virtual_machines")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/plans/virtual_machines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "plan_aNmodj4eDbE8W",
"type": "virtual_machine_plans",
"attributes": {
"name": "vm.l40s.tiny",
"specs": {
"memory": 16,
"gpu": "NVIDIA H100 Tensor Core GPU",
"vram_per_gpu": 80,
"vcpus": 14,
"vcpu": {
"count": 14,
"clock": 3.8,
"type": "Intel Xeon"
},
"nics": [
{
"type": "1 Gbps",
"count": "1"
}
],
"disk": {
"type": "local NVMe",
"size": {
"amount": 150,
"unit": "gib"
}
}
},
"regions": [
{
"name": "United States",
"locations": {
"available": [
"DAL"
],
"in_stock": [
"DAL"
]
},
"stock_level": "low",
"pricing": {
"USD": {
"hour": 1,
"month": 720,
"year": 8640
},
"BRL": {
"hour": 1,
"month": 720,
"year": 8640
}
}
}
],
"stock_level": "low",
"available_operating_systems": [
"ubuntu_24_04_x64_lts",
"debian_13",
"rocky_10",
"almalinux_10"
]
}
}
]
}Plans
List VM plans
GET
/
plans
/
virtual_machines
Python (SDK)
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.plans.list_vm_plans()
# Handle response
print(res)package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Plans.VM.List(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.VirtualMachinePlans != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.plans.vm.list();
console.log(result);
}
run();curl --request GET \
--url https://api.latitude.sh/plans/virtual_machines \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/plans/virtual_machines', 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.latitude.sh/plans/virtual_machines",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.latitude.sh/plans/virtual_machines")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/plans/virtual_machines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "plan_aNmodj4eDbE8W",
"type": "virtual_machine_plans",
"attributes": {
"name": "vm.l40s.tiny",
"specs": {
"memory": 16,
"gpu": "NVIDIA H100 Tensor Core GPU",
"vram_per_gpu": 80,
"vcpus": 14,
"vcpu": {
"count": 14,
"clock": 3.8,
"type": "Intel Xeon"
},
"nics": [
{
"type": "1 Gbps",
"count": "1"
}
],
"disk": {
"type": "local NVMe",
"size": {
"amount": 150,
"unit": "gib"
}
}
},
"regions": [
{
"name": "United States",
"locations": {
"available": [
"DAL"
],
"in_stock": [
"DAL"
]
},
"stock_level": "low",
"pricing": {
"USD": {
"hour": 1,
"month": 720,
"year": 8640
},
"BRL": {
"hour": 1,
"month": 720,
"year": 8640
}
}
}
],
"stock_level": "low",
"available_operating_systems": [
"ubuntu_24_04_x64_lts",
"debian_13",
"rocky_10",
"almalinux_10"
]
}
}
]
}Was this page helpful?
⌘I