获取模型信息
curl --request GET \
--url https://api.mountsea.ai/chat/models/{model} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mountsea.ai/chat/models/{model}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mountsea.ai/chat/models/{model}', 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.mountsea.ai/chat/models/{model}",
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.mountsea.ai/chat/models/{model}"
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.mountsea.ai/chat/models/{model}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/chat/models/{model}")
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_bodyChat
Get Model
GET
/
chat
/
models
/
{model}
获取模型信息
curl --request GET \
--url https://api.mountsea.ai/chat/models/{model} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mountsea.ai/chat/models/{model}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mountsea.ai/chat/models/{model}', 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.mountsea.ai/chat/models/{model}",
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.mountsea.ai/chat/models/{model}"
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.mountsea.ai/chat/models/{model}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/chat/models/{model}")
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_bodyOverview
Retrieve information about a specific model.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model ID (e.g., gpt-5.1) |
Response Format
{
"id": "gpt-5.1",
"object": "model",
"created": 1234567890,
"owned_by": "mountsea"
}
Example
Using OpenAI SDK
from openai import OpenAI
client = OpenAI(
api_key="your-api-key",
base_url="https://api.mountsea.ai/chat"
)
model = client.models.retrieve("gpt-5.1")
print(f"Model ID: {model.id}")
print(f"Owned by: {model.owned_by}")
Using cURL
curl https://api.mountsea.ai/chat/models/gpt-5.1 \
-H "Authorization: Bearer your-api-key"
Error Responses
| Status Code | Description |
|---|---|
| 404 | Model not found |
| 401 | Unauthorized - Invalid API key |
⌘I