Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.infercom.ai/v1",
api_key="your-infercom-api-key",
)
model = client.models.retrieve("MiniMax-M2.7")
print(model.id)curl https://api.infercom.ai/v1/models/MiniMax-M2.7 \
-H "Authorization: Bearer $INFERCOM_API_KEY"const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.infercom.ai/v1/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.infercom.ai/v1/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: Bearer <token>"
],
]);
$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.infercom.ai/v1/models/{model_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.infercom.ai/v1/models/{model_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.infercom.ai/v1/models/{model_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "model",
"owned_by": "<string>",
"context_length": 123,
"max_completion_tokens": 123,
"sn_metadata": {
"region": "EU",
"is_external": false,
"architecture": "<string>",
"provider": "<string>",
"capabilities": [
"<string>"
],
"license": "<string>",
"status": "<string>",
"hf_link": "<string>",
"overview": "<string>"
},
"pricing": {
"prompt": 123,
"completion": 123,
"duration_per_hour": 123
}
}{
"error": "<string>"
}Models
Get model metadata
Retrieve metadata for a single model by ID, including context length, max completion tokens, capabilities, and EU sovereignty region.
GET
/
models
/
{model_id}
Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.infercom.ai/v1",
api_key="your-infercom-api-key",
)
model = client.models.retrieve("MiniMax-M2.7")
print(model.id)curl https://api.infercom.ai/v1/models/MiniMax-M2.7 \
-H "Authorization: Bearer $INFERCOM_API_KEY"const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.infercom.ai/v1/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.infercom.ai/v1/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: Bearer <token>"
],
]);
$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.infercom.ai/v1/models/{model_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.infercom.ai/v1/models/{model_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.infercom.ai/v1/models/{model_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "model",
"owned_by": "<string>",
"context_length": 123,
"max_completion_tokens": 123,
"sn_metadata": {
"region": "EU",
"is_external": false,
"architecture": "<string>",
"provider": "<string>",
"capabilities": [
"<string>"
],
"license": "<string>",
"status": "<string>",
"hf_link": "<string>",
"overview": "<string>"
},
"pricing": {
"prompt": 123,
"completion": 123,
"duration_per_hour": 123
}
}{
"error": "<string>"
}Authorizations
Infercom API Key
Path Parameters
model id to get metadata
Response
Successful Response
model metadata
model id
type
Available options:
model Allowed value:
"model"model owner
model context length
model max completion tokens
Additional metadata provided by SambaNova. Use the ?verbose=true query parameter on /v1/models to ensure this field is populated.
Show child attributes
Show child attributes
pricing details
Show child attributes
Show child attributes