Compare models
curl --request GET \
--url https://api.openmodex.com/v1/models/compare \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openmodex.com/v1/models/compare"
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/compare', 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/compare",
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/compare"
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/compare")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openmodex.com/v1/models/compare")
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": "model_comparison",
"models": [
"<string>"
],
"comparison": {},
"highlights": {
"cheapest": "<string>",
"fastest": "<string>",
"best_quality": "<string>",
"best_code": "<string>",
"longest_context": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}모델
모델 비교
GET /v1/models/compare — 여러 모델을 나란히 비교합니다.
GET
/
v1
/
models
/
compare
Compare models
curl --request GET \
--url https://api.openmodex.com/v1/models/compare \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openmodex.com/v1/models/compare"
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/compare', 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/compare",
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/compare"
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/compare")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openmodex.com/v1/models/compare")
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": "model_comparison",
"models": [
"<string>"
],
"comparison": {},
"highlights": {
"cheapest": "<string>",
"fastest": "<string>",
"best_quality": "<string>",
"best_code": "<string>",
"longest_context": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}쿼리 파라미터
string
필수
비교할 모델 ID의 쉼표로 구분된 목록 (예:
openai/gpt-4o,anthropic/claude-3.5-sonnet).응답
{
"object": "model_comparison",
"models": ["openai/gpt-4o", "anthropic/claude-3.5-sonnet"],
"comparison": {
"openai/gpt-4o": {
"name": "GPT-4o",
"provider": "openai",
"context_length": 128000,
"pricing": {
"openmodex_input_per_m": 2.50,
"openmodex_output_per_m": 10.00
},
"performance": {
"latency_p50_ms": 800,
"availability": 99.9
},
"quality_scores": {
"overall": 92,
"code": 90,
"math": 88,
"reasoning": 91
}
},
"anthropic/claude-3.5-sonnet": {
"name": "Claude 3.5 Sonnet",
"provider": "anthropic",
"context_length": 200000,
"pricing": {
"openmodex_input_per_m": 3.00,
"openmodex_output_per_m": 15.00
},
"performance": {
"latency_p50_ms": 900,
"availability": 99.8
},
"quality_scores": {
"overall": 93,
"code": 93,
"math": 90,
"reasoning": 94
}
}
},
"highlights": {
"cheapest": "openai/gpt-4o",
"fastest": "openai/gpt-4o",
"best_quality": "anthropic/claude-3.5-sonnet",
"best_code": "anthropic/claude-3.5-sonnet",
"longest_context": "anthropic/claude-3.5-sonnet"
}
}
예제
curl "https://api.openmodex.com/v1/models/compare?models=openai/gpt-4o,anthropic/claude-3.5-sonnet" \
-H "Authorization: Bearer omx_sk_YOUR_KEY"
const comparison = await client.models.compare([
'openai/gpt-4o',
'anthropic/claude-3.5-sonnet',
]);
console.log(comparison.highlights);
comparison = client.models.compare([
"openai/gpt-4o",
"anthropic/claude-3.5-sonnet",
])
print(comparison.highlights)
인증
BearerAuthApiKeyAuth
API key authentication. Pass your OpenModex API key as a Bearer token in the Authorization header: Authorization: Bearer omx_sk_...
쿼리 매개변수
Comma-separated list of model IDs to compare (2-4 models).
응답
Model comparison response.
Response from comparing models.
The object type, always 'model_comparison'.
사용 가능한 옵션:
model_comparison The list of model IDs being compared.
An object mapping each model ID to its comparison data including pricing, performance, and quality scores.
Show child attributes
Show child attributes
Highlights identifying the best model in each category.
Show child attributes
Show child attributes