curl --request GET \
--url https://api.gcore.com/cloud/v3/inference/models/{model_id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/cloud/v3/inference/models/{model_id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/inference/models/{model_id}', 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/models/{model_id}",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v3/inference/models/{model_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/cloud/v3/inference/models/{model_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/inference/models/{model_id}")
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{
"category": "Text Classification",
"default_flavor_name": "inference-16vcpu-232gib-1xh100-80gb",
"description": "My first model",
"developer": "Stability AI",
"documentation_page": "/docs",
"eula_url": "https://example.com/eula",
"example_curl_request": "curl -X POST http://localhost:8080/predict -d '{\"data\": \"sample\"}'",
"has_eula": true,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"image_registry_id": "123e4567-e89b-12d3-a456-426614174999",
"image_url": "registry.hub.docker.com/my_model:latest",
"inference_backend": "torch",
"inference_frontend": "gradio",
"model_id": "mistralai/Pixtral-12B-2409",
"name": "model1",
"openai_compatibility": "full",
"port": 8080,
"version": "v0.1"
}Get model from catalog
curl --request GET \
--url https://api.gcore.com/cloud/v3/inference/models/{model_id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/cloud/v3/inference/models/{model_id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/inference/models/{model_id}', 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/models/{model_id}",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v3/inference/models/{model_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/cloud/v3/inference/models/{model_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/inference/models/{model_id}")
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{
"category": "Text Classification",
"default_flavor_name": "inference-16vcpu-232gib-1xh100-80gb",
"description": "My first model",
"developer": "Stability AI",
"documentation_page": "/docs",
"eula_url": "https://example.com/eula",
"example_curl_request": "curl -X POST http://localhost:8080/predict -d '{\"data\": \"sample\"}'",
"has_eula": true,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"image_registry_id": "123e4567-e89b-12d3-a456-426614174999",
"image_url": "registry.hub.docker.com/my_model:latest",
"inference_backend": "torch",
"inference_frontend": "gradio",
"model_id": "mistralai/Pixtral-12B-2409",
"name": "model1",
"openai_compatibility": "full",
"port": 8080,
"version": "v0.1"
}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
Model ID
Response
OK
Category of the model.
"Text Classification"
Default flavor for the model.
"inference-16vcpu-232gib-1xh100-80gb"
Description of the model.
"My first model"
Developer of the model.
"Stability AI"
Path to the documentation page.
"/docs"
URL to the EULA text.
"https://example.com/eula"
Example curl request to the model.
"curl -X POST http://localhost:8080/predict -d '{\"data\": \"sample\"}'"
Whether the model has an EULA.
true
Model ID.
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Image registry of the model.
"123e4567-e89b-12d3-a456-426614174999"
Image URL of the model.
"registry.hub.docker.com/my_model:latest"
Describing underlying inference engine.
"torch"
Describing model frontend type.
"gradio"
Model name to perform inference call.
"mistralai/Pixtral-12B-2409"
Name of the model.
"model1"
OpenAI compatibility level.
"full"
Port on which the model runs.
8080
Version of the model.
"v0.1"
Was this page helpful?