List AI models
curl --request GET \
--url https://api.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/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.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models",
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.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models"
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.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models")
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{
"status": "success",
"data": {
"pages": {
"current_page": 1,
"last_page": 1,
"per_page": 15
},
"models": [
{
"id": 1,
"name": "GPT-3.5 Turbo",
"credits": 1,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 2,
"name": "GPT-4",
"credits": 10,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 3,
"name": "Claude 3 Opus",
"credits": 18,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 4,
"name": "Claude 3 Sonnet",
"credits": 4,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 5,
"name": "Claude 3 Haiku",
"credits": 1,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 6,
"name": "GPT-4o",
"credits": 5,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 7,
"name": "Claude 3.5 Sonnet",
"credits": 4,
"temperature": {
"min": 0,
"max": 1
}
},
]
}
}
AI
List AI models
Get a list of all the supported AI models.
GET
/
chatbots
/
{chatbotId}
/
ai
/
kb
/
models
List AI models
curl --request GET \
--url https://api.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/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.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models",
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.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models"
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.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatling.ai/v2/chatbots/{chatbotId}/ai/kb/models")
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{
"status": "success",
"data": {
"pages": {
"current_page": 1,
"last_page": 1,
"per_page": 15
},
"models": [
{
"id": 1,
"name": "GPT-3.5 Turbo",
"credits": 1,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 2,
"name": "GPT-4",
"credits": 10,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 3,
"name": "Claude 3 Opus",
"credits": 18,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 4,
"name": "Claude 3 Sonnet",
"credits": 4,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 5,
"name": "Claude 3 Haiku",
"credits": 1,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 6,
"name": "GPT-4o",
"credits": 5,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 7,
"name": "Claude 3.5 Sonnet",
"credits": 4,
"temperature": {
"min": 0,
"max": 1
}
},
]
}
}
Request parameters
Path
The chatbot ID.
Query
The page number for pagination.
Response
The status of the request. Will be
success if the request was successful, otherwise error.Show properties
Show properties
{
"status": "success",
"data": {
"pages": {
"current_page": 1,
"last_page": 1,
"per_page": 15
},
"models": [
{
"id": 1,
"name": "GPT-3.5 Turbo",
"credits": 1,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 2,
"name": "GPT-4",
"credits": 10,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 3,
"name": "Claude 3 Opus",
"credits": 18,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 4,
"name": "Claude 3 Sonnet",
"credits": 4,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 5,
"name": "Claude 3 Haiku",
"credits": 1,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 6,
"name": "GPT-4o",
"credits": 5,
"temperature": {
"min": 0,
"max": 1
}
},
{
"id": 7,
"name": "Claude 3.5 Sonnet",
"credits": 4,
"temperature": {
"min": 0,
"max": 1
}
},
]
}
}
⌘I

