curl --request GET \
--url https://api.openmodex.com/v1/models/{model_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openmodex.com/v1/models/{model_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openmodex.com/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.openmodex.com/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.openmodex.com/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.openmodex.com/v1/models/{model_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openmodex.com/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": "<string>",
"name": "<string>",
"provider": "<string>",
"description": "<string>",
"category": [
"<string>"
],
"context_length": 123,
"max_output_tokens": 123,
"modalities": {
"input": [
"<string>"
],
"output": [
"<string>"
]
},
"features": [
"<string>"
],
"license": "<string>",
"pricing": {
"official_input_per_m": 123,
"official_output_per_m": 123,
"openmodex_input_per_m": 123,
"openmodex_output_per_m": 123,
"cached_input_per_m": 123,
"currency": "<string>"
},
"performance": {
"availability": 123,
"latency_p50_ms": 123,
"latency_p99_ms": 123
},
"quality_scores": {
"overall": 123,
"code": 123,
"math": 123,
"reasoning": 123
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}Obtener Modelo
GET /v1/models/:id — Obtener información detallada sobre un modelo específico.
curl --request GET \
--url https://api.openmodex.com/v1/models/{model_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openmodex.com/v1/models/{model_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openmodex.com/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.openmodex.com/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.openmodex.com/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.openmodex.com/v1/models/{model_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openmodex.com/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": "<string>",
"name": "<string>",
"provider": "<string>",
"description": "<string>",
"category": [
"<string>"
],
"context_length": 123,
"max_output_tokens": 123,
"modalities": {
"input": [
"<string>"
],
"output": [
"<string>"
]
},
"features": [
"<string>"
],
"license": "<string>",
"pricing": {
"official_input_per_m": 123,
"official_output_per_m": 123,
"openmodex_input_per_m": 123,
"openmodex_output_per_m": 123,
"cached_input_per_m": 123,
"currency": "<string>"
},
"performance": {
"availability": 123,
"latency_p50_ms": 123,
"latency_p99_ms": 123
},
"quality_scores": {
"overall": 123,
"code": 123,
"math": 123,
"reasoning": 123
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}Parámetros de Ruta
openai/gpt-4o).Respuesta
{
"id": "openai/gpt-4o",
"object": "model",
"name": "GPT-4o",
"provider": "openai",
"description": "Most capable GPT-4 model with vision capabilities",
"category": ["chat", "vision"],
"context_length": 128000,
"max_output_tokens": 16384,
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"features": ["streaming", "function_calling", "json_mode", "vision"],
"license": "proprietary",
"pricing": {
"official_input_per_m": 2.50,
"official_output_per_m": 10.00,
"openmodex_input_per_m": 2.50,
"openmodex_output_per_m": 10.00,
"cached_input_per_m": 1.25,
"currency": "USD"
},
"performance": {
"availability": 99.9,
"latency_p50_ms": 800,
"latency_p99_ms": 3500
},
"quality_scores": {
"overall": 92,
"code": 90,
"math": 88,
"reasoning": 91
}
}
Ejemplo
curl https://api.openmodex.com/v1/models/openai/gpt-4o \
-H "Authorization: Bearer omx_sk_YOUR_KEY"
const model = await client.models.retrieve('openai/gpt-4o');
console.log(model.pricing, model.quality_scores);
model = client.models.retrieve("openai/gpt-4o")
print(model.pricing, model.quality_scores)
Autorizaciones
API key authentication. Pass your OpenModex API key as a Bearer token in the Authorization header: Authorization: Bearer omx_sk_...
Parámetros de ruta
The unique identifier of the model to retrieve.
Respuesta
Model details.
Represents a model available through OpenModex.
The unique model identifier.
The object type (e.g., 'model').
The display name of the model.
The provider of the model (e.g., 'openai', 'anthropic', 'google').
A human-readable description of the model.
Categories the model belongs to (e.g., 'chat', 'embedding', 'image').
Maximum context length in tokens.
Maximum number of output tokens the model can generate.
Supported input and output modalities.
Show child attributes
Show child attributes
List of supported features (e.g., 'streaming', 'function_calling', 'json_mode').
The license under which the model is available.
Pricing information for the model.
Show child attributes
Show child attributes
Performance metrics for the model.
Show child attributes
Show child attributes
Quality benchmark scores for the model.
Show child attributes
Show child attributes