Get Token Models
curl --request GET \
--url https://api.example.com/v1/modelsimport requests
url = "https://api.example.com/v1/models"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/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://api.example.com/v1/models",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/models"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/models")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/models")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAPI キー & コンソール管理
Get Token Models
Query the list of models available to a specific token
GET
/
v1
/
models
Get Token Models
curl --request GET \
--url https://api.example.com/v1/modelsimport requests
url = "https://api.example.com/v1/models"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/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://api.example.com/v1/models",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/models"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/models")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/models")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body更新日: 2026-06-06
Overview
Get the list of models that the current token (API Key) can access. If the token has no model restrictions, all enabled system models are returned. The currently supported public endpoint is:GET /v1/models
GET /api/token/models is not a currently exposed public endpoint. Use /v1/models instead.
Authentication
Authenticate using an API Key (sk-xxx):Authorization: Bearer sk-xxx
Response Format
{
"success": true,
"object": "list",
"data": [
{
"id": "gpt-5.5",
"object": "model",
"owned_by": "openai"
},
{
"id": "claude-opus-4-8",
"object": "model",
"owned_by": "anthropic"
}
]
}
Code Examples
from openai import OpenAI
client = OpenAI(
api_key="sk-xxx",
base_url="https://api.crazyrouter.com/v1"
)
# Get model list via OpenAI SDK
models = client.models.list()
for model in models.data:
print(model.id)
import requests
response = requests.get(
"https://api.crazyrouter.com/v1/models",
headers={"Authorization": "Bearer sk-xxx"}
)
models = response.json()["data"]
for model in models:
print(model["id"])
curl https://api.crazyrouter.com/v1/models \
-H "Authorization: Bearer sk-xxx"
If you use the OpenAI SDK,
client.models.list() is effectively calling GET /v1/models.