Models
Get Available Models
Returns the available models of a given type. Use it to find the text-embedding and rerank models to configure on a knowledge base.
GET
/
workspaces
/
current
/
models
/
model-types
/
{model_type}
Get Available Models
curl --request GET \
--url https://{api_base_url}/workspaces/current/models/model-types/{model_type} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/workspaces/current/models/model-types/{model_type}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{api_base_url}/workspaces/current/models/model-types/{model_type}', 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_base_url}/workspaces/current/models/model-types/{model_type}",
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_base_url}/workspaces/current/models/model-types/{model_type}"
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_base_url}/workspaces/current/models/model-types/{model_type}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/workspaces/current/models/model-types/{model_type}")
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{
"data": [
{
"provider": "langgenius/openai/openai",
"label": {
"en_US": "OpenAI",
"zh_Hans": "OpenAI"
},
"icon_small": {
"en_US": "https://example.com/openai-small.svg",
"zh_Hans": "https://example.com/openai-small.svg"
},
"status": "active",
"models": [
{
"model": "text-embedding-3-small",
"label": {
"en_US": "text-embedding-3-small",
"zh_Hans": "text-embedding-3-small"
},
"model_type": "text-embedding",
"features": null,
"fetch_from": "predefined-model",
"model_properties": {
"context_size": 8191
},
"status": "active",
"deprecated": false,
"load_balancing_enabled": false,
"has_invalid_load_balancing_configs": false
}
],
"tenant_id": "11223344-5566-7788-99aa-bbccddeeff00",
"icon_small_dark": null
}
]
}Authorizations
Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).
Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).
Path Parameters
Type of model to retrieve. For knowledge base configuration, use text-embedding for embedding models or rerank for reranking models.
Available options:
text-embedding, rerank, llm, tts, speech2text, moderation Response
200 - application/json
Available models for the specified type.
List of model providers with their available models.
Show child attributes
Show child attributes
Last modified on July 17, 2026
Was this page helpful?
⌘I
Get Available Models
curl --request GET \
--url https://{api_base_url}/workspaces/current/models/model-types/{model_type} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/workspaces/current/models/model-types/{model_type}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{api_base_url}/workspaces/current/models/model-types/{model_type}', 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_base_url}/workspaces/current/models/model-types/{model_type}",
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_base_url}/workspaces/current/models/model-types/{model_type}"
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_base_url}/workspaces/current/models/model-types/{model_type}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/workspaces/current/models/model-types/{model_type}")
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{
"data": [
{
"provider": "langgenius/openai/openai",
"label": {
"en_US": "OpenAI",
"zh_Hans": "OpenAI"
},
"icon_small": {
"en_US": "https://example.com/openai-small.svg",
"zh_Hans": "https://example.com/openai-small.svg"
},
"status": "active",
"models": [
{
"model": "text-embedding-3-small",
"label": {
"en_US": "text-embedding-3-small",
"zh_Hans": "text-embedding-3-small"
},
"model_type": "text-embedding",
"features": null,
"fetch_from": "predefined-model",
"model_properties": {
"context_size": 8191
},
"status": "active",
"deprecated": false,
"load_balancing_enabled": false,
"has_invalid_load_balancing_configs": false
}
],
"tenant_id": "11223344-5566-7788-99aa-bbccddeeff00",
"icon_small_dark": null
}
]
}