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
)
gpu_baremetal_flavor_list = client.cloud.gpu_baremetal.clusters.flavors.list(
project_id=1,
region_id=7,
)
print(gpu_baremetal_flavor_list.count)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"),
)
gpuBaremetalFlavorList, err := client.Cloud.GPUBaremetal.Clusters.Flavors.List(context.TODO(), cloud.GPUBaremetalClusterFlavorListParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(7),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", gpuBaremetalFlavorList.Count)
}curl --request GET \
--url https://api.gcore.com/cloud/v3/gpu/baremetal/{project_id}/{region_id}/flavors \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/gpu/baremetal/{project_id}/{region_id}/flavors', 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/baremetal/{project_id}/{region_id}/flavors",
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/baremetal/{project_id}/{region_id}/flavors")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/gpu/baremetal/{project_id}/{region_id}/flavors")
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": [
{
"architecture": "x86_64",
"capacity": 1,
"disabled": false,
"hardware_description": {
"cpu": "1x Intel Xeon 4C/8T 3.7 GHz",
"disk": "2x 250GiB SSD",
"gpu": "1x NVIDIA 11GB",
"network": "1x 500Mbps",
"ram": "32 GiB"
},
"hardware_properties": {
"gpu_count": 123,
"gpu_manufacturer": "<string>",
"gpu_model": "<string>",
"nic_eth": "2x100;2x25",
"nic_ib": "8x400"
},
"name": "g1-gpu-1-2-1",
"reserved_capacity": 5,
"supported_features": {
"security_groups": true
}
}
]
}GPU Bare Metal
List bare metal GPU flavors
GET
/
cloud
/
v3
/
gpu
/
baremetal
/
{project_id}
/
{region_id}
/
flavors
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
)
gpu_baremetal_flavor_list = client.cloud.gpu_baremetal.clusters.flavors.list(
project_id=1,
region_id=7,
)
print(gpu_baremetal_flavor_list.count)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"),
)
gpuBaremetalFlavorList, err := client.Cloud.GPUBaremetal.Clusters.Flavors.List(context.TODO(), cloud.GPUBaremetalClusterFlavorListParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(7),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", gpuBaremetalFlavorList.Count)
}curl --request GET \
--url https://api.gcore.com/cloud/v3/gpu/baremetal/{project_id}/{region_id}/flavors \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/gpu/baremetal/{project_id}/{region_id}/flavors', 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/baremetal/{project_id}/{region_id}/flavors",
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/baremetal/{project_id}/{region_id}/flavors")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/gpu/baremetal/{project_id}/{region_id}/flavors")
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": [
{
"architecture": "x86_64",
"capacity": 1,
"disabled": false,
"hardware_description": {
"cpu": "1x Intel Xeon 4C/8T 3.7 GHz",
"disk": "2x 250GiB SSD",
"gpu": "1x NVIDIA 11GB",
"network": "1x 500Mbps",
"ram": "32 GiB"
},
"hardware_properties": {
"gpu_count": 123,
"gpu_manufacturer": "<string>",
"gpu_model": "<string>",
"nic_eth": "2x100;2x25",
"nic_ib": "8x400"
},
"name": "g1-gpu-1-2-1",
"reserved_capacity": 5,
"supported_features": {
"security_groups": true
}
}
]
}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
Set to true to remove the disabled flavors from the response.
Example:
true
Set to true if the response should include flavor prices.
Example:
true
Response
200 - application/json
OK
Number of objects
Required range:
x >= 0Example:
1
results
(Bare metal GPU flavors chema without price · object | Bare metal GPU flavors chema with price · object)[]
required
Objects
- Bare metal GPU flavors chema without price
- Bare metal GPU flavors chema with price
Show child attributes
Show child attributes
Was this page helpful?
⌘I