List available models for standard inference
curl --request GET \
--url https://gateway.prem.io/openai/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://gateway.prem.io/openai/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gateway.prem.io/openai/models', 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://gateway.prem.io/openai/models",
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://gateway.prem.io/openai/models"
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://gateway.prem.io/openai/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.prem.io/openai/models")
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{
"object": "<string>",
"data": [
{
"id": "<string>",
"object": "model",
"metadata": {
"attestation_version": "v1"
},
"created": 123,
"owned_by": "<string>",
"model": "<string>",
"name": "<string>",
"description": "<string>",
"type": "<string>",
"input_modalities": [
"<string>"
],
"price_config": {},
"regions": [
"<string>"
],
"requires_auth": 123,
"usage_mode": "<string>",
"visible_in_dashboard": 123,
"likes_count": 123,
"dislikes_count": 123,
"total_reviews": 123,
"rating_percent": 123
}
]
}{
"status": 401,
"error": "Some error message",
"message": null,
"env": "development",
"log": {
"request_id": "req_1234567890"
},
"support_id": "req_support_01923f4e-7b2a-7c3d-9e8f-0a1b2c3d4e5f",
"data": {},
"validator": {
"email": "Invalid email address",
"password": "Password is required"
}
}{
"status": 403,
"error": "Some error message",
"message": null,
"env": "development",
"log": {
"request_id": "req_1234567890"
},
"support_id": "req_support_01923f4e-7b2a-7c3d-9e8f-0a1b2c3d4e5f",
"data": {},
"validator": {
"email": "Invalid email address",
"password": "Password is required"
}
}Endpoints
List available models for standard inference
Get a list of models available for standard (OpenAI-compatible) inference
GET
/
openai
/
models
List available models for standard inference
curl --request GET \
--url https://gateway.prem.io/openai/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://gateway.prem.io/openai/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gateway.prem.io/openai/models', 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://gateway.prem.io/openai/models",
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://gateway.prem.io/openai/models"
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://gateway.prem.io/openai/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.prem.io/openai/models")
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{
"object": "<string>",
"data": [
{
"id": "<string>",
"object": "model",
"metadata": {
"attestation_version": "v1"
},
"created": 123,
"owned_by": "<string>",
"model": "<string>",
"name": "<string>",
"description": "<string>",
"type": "<string>",
"input_modalities": [
"<string>"
],
"price_config": {},
"regions": [
"<string>"
],
"requires_auth": 123,
"usage_mode": "<string>",
"visible_in_dashboard": 123,
"likes_count": 123,
"dislikes_count": 123,
"total_reviews": 123,
"rating_percent": 123
}
]
}{
"status": 401,
"error": "Some error message",
"message": null,
"env": "development",
"log": {
"request_id": "req_1234567890"
},
"support_id": "req_support_01923f4e-7b2a-7c3d-9e8f-0a1b2c3d4e5f",
"data": {},
"validator": {
"email": "Invalid email address",
"password": "Password is required"
}
}{
"status": 403,
"error": "Some error message",
"message": null,
"env": "development",
"log": {
"request_id": "req_1234567890"
},
"support_id": "req_support_01923f4e-7b2a-7c3d-9e8f-0a1b2c3d4e5f",
"data": {},
"validator": {
"email": "Invalid email address",
"password": "Password is required"
}
}Zero Data Retention catalog
This endpoint returns the models that your API key can use for ZDR inference. UseGET /rvenc/models for the confidential catalog.
The response uses the OpenAI models list format. It has "object": "list" and an array in data. Each entry has the standard id, object, created, and owned_by fields, and Prem adds more fields after them.
curl "https://gateway.prem.io/openai/models?type=CHAT" \
-H "Authorization: Bearer $PREM_API_KEY"
for model in client.models.list():
print(model.id)
regions field of each entry shows the ZDR regions that give the model. See Models & Pricing for the full field reference.Authorizations
BearerAuthApiKeyAuth