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
)
inference_flavor = client.cloud.inference.flavors.get(
"inference-16vcpu-232gib-1xh100-80gb",
)
print(inference_flavor.cpu)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
inferenceFlavor, err := client.Cloud.Inference.Flavors.Get(context.TODO(), "inference-16vcpu-232gib-1xh100-80gb")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", inferenceFlavor.CPU)
}
curl --request GET \
--url https://api.gcore.com/cloud/v3/inference/flavors/{flavor_name} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/inference/flavors/{flavor_name}', 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/inference/flavors/{flavor_name}",
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/inference/flavors/{flavor_name}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/inference/flavors/{flavor_name}")
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{
"cpu": 2,
"description": "1xL40S / 16 vCPU / 232GiB RAM",
"gpu": 1,
"gpu_compute_capability": "8.6",
"gpu_memory": 80,
"gpu_model": "H100",
"is_gpu_shared": false,
"memory": 4,
"name": "inference-16vcpu-232gib-1xh100-80gb"
}Everywhere Inference
Get inference flavor
GET
/
cloud
/
v3
/
inference
/
flavors
/
{flavor_name}
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
)
inference_flavor = client.cloud.inference.flavors.get(
"inference-16vcpu-232gib-1xh100-80gb",
)
print(inference_flavor.cpu)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
inferenceFlavor, err := client.Cloud.Inference.Flavors.Get(context.TODO(), "inference-16vcpu-232gib-1xh100-80gb")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", inferenceFlavor.CPU)
}
curl --request GET \
--url https://api.gcore.com/cloud/v3/inference/flavors/{flavor_name} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/inference/flavors/{flavor_name}', 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/inference/flavors/{flavor_name}",
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/inference/flavors/{flavor_name}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/inference/flavors/{flavor_name}")
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{
"cpu": 2,
"description": "1xL40S / 16 vCPU / 232GiB RAM",
"gpu": 1,
"gpu_compute_capability": "8.6",
"gpu_memory": 80,
"gpu_model": "H100",
"is_gpu_shared": false,
"memory": 4,
"name": "inference-16vcpu-232gib-1xh100-80gb"
}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
Inference flavor name.
Example:
"inference-16vcpu-232gib-1xh100-80gb"
Response
200 - application/json
OK
Inference flavor cpu count.
Example:
2
Inference flavor description.
Example:
"1xL40S / 16 vCPU / 232GiB RAM"
Inference flavor gpu count.
Example:
1
Inference flavor gpu compute capability.
Example:
"8.6"
Inference flavor gpu memory in Gi.
Example:
80
Inference flavor gpu model.
Example:
"H100"
Inference flavor is gpu shared (always false, deprecated).
Example:
false
Inference flavor memory in Gi.
Example:
4
Inference flavor name.
Example:
"inference-16vcpu-232gib-1xh100-80gb"
Was this page helpful?