Utility
Models
API endpoint for retrieving available models
Authorization
AuthorizationRequiredBearer <token>In: header
Response Body
Successfully retrieved models list
TypeScript Definitions
Use the response body type in TypeScript.
dataarray<object>Bad Request
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredintegerFormat:
"int32"messageRequiredstringcurl -X GET "https://api.search1api.com/v1/models" \
-H "Authorization: Bearer <token>"fetch("https://api.search1api.com/v1/models", {
headers: {
"Authorization": "Bearer <token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.search1api.com/v1/models"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://api.search1api.com/v1/models"
response = requests.request("GET", url, headers = {
"Authorization": "Bearer <token>"
})
print(response.text){
"data": [
{
"id": "string",
"name": "string",
"created": 0,
"description": "string",
"context_length": 0,
"max_completion_tokens": 0
}
]
}{
"error": 0,
"message": "string"
}