Python
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.gpu_virtual.clusters.list(
project_id=1,
region_id=7,
)
page = page.results[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/cloud"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Cloud.GPUVirtual.Clusters.List(context.TODO(), cloud.GPUVirtualClusterListParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(7),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}curl --request GET \
--url https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters', 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.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters",
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.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters")
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{
"count": 1,
"results": [
{
"created_at": "2024-12-31T23:59:59Z",
"flavor": "g3-ai-32-192-1500-l40s-48-1",
"has_pending_changes": false,
"id": "1aaaab48-10d0-46d9-80cc-85209284ceb4",
"name": "my virtual gpu cluster",
"servers_count": 2,
"servers_ids": [
"b4522653-fbcd-44a0-a949-541570a52281",
"e56192de-ed28-452a-b775-eeeacc795e3b"
],
"servers_settings": {
"file_shares": [
{
"id": "a3f2d1b8-45e6-4f8a-bb5d-19dbf2cd7e9a",
"mount_path": "/mnt/vast"
}
],
"interfaces": [
{
"ip_family": "ipv4",
"name": "eth0",
"type": "<string>"
}
],
"security_groups": [
{
"id": "ae74714c-c380-48b4-87f8-758d656cdad6",
"name": "default"
}
],
"ssh_key_name": "my-ssh-key",
"user_data": "eyJ0ZXN0IjogImRhdGEifQ==",
"volumes": [
{
"boot_index": 1,
"delete_on_termination": true,
"image_id": "3793c250-0b3b-4678-bab3-e11afbc29657",
"name": "my-data-disk",
"size": 100,
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
]
}
]
},
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"updated_at": "2025-01-11T23:59:59Z"
}
]
}GPU Virtual
List virtual GPU clusters
List all virtual GPU clusters in the specified project and region.
GET
/
cloud
/
v3
/
gpu
/
virtual
/
{project_id}
/
{region_id}
/
clusters
Python
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.gpu_virtual.clusters.list(
project_id=1,
region_id=7,
)
page = page.results[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/cloud"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Cloud.GPUVirtual.Clusters.List(context.TODO(), cloud.GPUVirtualClusterListParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(7),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}curl --request GET \
--url https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters', 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.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters",
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.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters")
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{
"count": 1,
"results": [
{
"created_at": "2024-12-31T23:59:59Z",
"flavor": "g3-ai-32-192-1500-l40s-48-1",
"has_pending_changes": false,
"id": "1aaaab48-10d0-46d9-80cc-85209284ceb4",
"name": "my virtual gpu cluster",
"servers_count": 2,
"servers_ids": [
"b4522653-fbcd-44a0-a949-541570a52281",
"e56192de-ed28-452a-b775-eeeacc795e3b"
],
"servers_settings": {
"file_shares": [
{
"id": "a3f2d1b8-45e6-4f8a-bb5d-19dbf2cd7e9a",
"mount_path": "/mnt/vast"
}
],
"interfaces": [
{
"ip_family": "ipv4",
"name": "eth0",
"type": "<string>"
}
],
"security_groups": [
{
"id": "ae74714c-c380-48b4-87f8-758d656cdad6",
"name": "default"
}
],
"ssh_key_name": "my-ssh-key",
"user_data": "eyJ0ZXN0IjogImRhdGEifQ==",
"volumes": [
{
"boot_index": 1,
"delete_on_termination": true,
"image_id": "3793c250-0b3b-4678-bab3-e11afbc29657",
"name": "my-data-disk",
"size": 100,
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
]
}
]
},
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"updated_at": "2025-01-11T23:59:59Z"
}
]
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Path Parameters
Project ID
Example:
1
Region ID
Example:
7
Query Parameters
Limit of items on a single page
Required range:
x <= 1000Example:
10
Offset in results list
Required range:
x >= 0Example:
0
Was this page helpful?
⌘I