cURL
curl --request GET \
--url https://app.teable.ai/api/%7BbaseId%7D/ai/config \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'const url = 'https://app.teable.ai/api/%7BbaseId%7D/ai/config';
const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}const http = require('https');
const options = {
method: 'GET',
hostname: 'app.teable.ai',
port: null,
path: '/api/%7BbaseId%7D/ai/config',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }
conn.request("GET", "/api/%7BbaseId%7D/ai/config", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teable.ai/api/{baseId}/ai/config",
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://app.teable.ai/api/{baseId}/ai/config"
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://app.teable.ai/api/{baseId}/ai/config")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/{baseId}/ai/config")
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{
"llmProviders": [
{
"type": "openai",
"name": "<string>",
"models": "",
"isInstance": true,
"modelConfigs": {}
}
],
"enable": true,
"embeddingModel": "<string>",
"translationModel": "<string>",
"chatModel": {
"xl": "<string>",
"lg": "<string>",
"md": "<string>",
"sm": "<string>",
"ability": {
"image": true,
"pdf": true,
"webSearch": true,
"toolCall": true,
"reasoning": true,
"imageGeneration": true
},
"hiddenTiers": [
"xl"
],
"defaultTier": "xl",
"tags": [
"<string>"
]
},
"capabilities": {
"disableActions": [
"<string>"
],
"disableModelSelection": true
},
"gatewayModels": [
{
"id": "<string>",
"label": "<string>",
"enabled": true,
"capabilities": {
"image": true,
"pdf": true,
"webSearch": true,
"toolCall": true,
"reasoning": true,
"imageGeneration": true
},
"pricing": {
"input": "<string>",
"output": "<string>",
"inputCacheRead": "<string>",
"inputCacheWrite": "<string>",
"reasoning": "<string>",
"image": "<string>",
"webSearch": "<string>",
"inputTiers": [
{
"cost": "<string>",
"min": 123,
"max": 123
}
],
"outputTiers": [
{
"cost": "<string>",
"min": 123,
"max": 123
}
],
"inputCacheReadTiers": [
{
"cost": "<string>",
"min": 123,
"max": 123
}
],
"inputCacheWriteTiers": [
{
"cost": "<string>",
"min": 123,
"max": 123
}
]
},
"rates": {
"inputRate": 1,
"outputRate": 1,
"cacheReadRate": 1,
"cacheWriteRate": 1,
"reasoningRate": 1,
"imageRate": 1,
"webSearchRate": 1
},
"isImageModel": true,
"defaultFor": [
"chatLg"
],
"testedAt": 123,
"ownedBy": "alibaba",
"modelType": "language",
"tags": [
"<string>"
],
"contextWindow": 123,
"maxTokens": 123,
"description": "<string>",
"i18nDescription": {
"en": "<string>",
"zh": "<string>"
},
"recommended": true,
"recommendedDescription": {
"en": "<string>",
"zh": "<string>"
}
}
],
"attachmentTransferMode": "url",
"modelDefinationMap": {}
}ai
Get aiconfig
Get the configuration of ai, including instance and space configuration
Required token scopes: base|read
GET
/
{baseId}
/
ai
/
config
cURL
curl --request GET \
--url https://app.teable.ai/api/%7BbaseId%7D/ai/config \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'const url = 'https://app.teable.ai/api/%7BbaseId%7D/ai/config';
const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}const http = require('https');
const options = {
method: 'GET',
hostname: 'app.teable.ai',
port: null,
path: '/api/%7BbaseId%7D/ai/config',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }
conn.request("GET", "/api/%7BbaseId%7D/ai/config", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teable.ai/api/{baseId}/ai/config",
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://app.teable.ai/api/{baseId}/ai/config"
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://app.teable.ai/api/{baseId}/ai/config")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/{baseId}/ai/config")
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{
"llmProviders": [
{
"type": "openai",
"name": "<string>",
"models": "",
"isInstance": true,
"modelConfigs": {}
}
],
"enable": true,
"embeddingModel": "<string>",
"translationModel": "<string>",
"chatModel": {
"xl": "<string>",
"lg": "<string>",
"md": "<string>",
"sm": "<string>",
"ability": {
"image": true,
"pdf": true,
"webSearch": true,
"toolCall": true,
"reasoning": true,
"imageGeneration": true
},
"hiddenTiers": [
"xl"
],
"defaultTier": "xl",
"tags": [
"<string>"
]
},
"capabilities": {
"disableActions": [
"<string>"
],
"disableModelSelection": true
},
"gatewayModels": [
{
"id": "<string>",
"label": "<string>",
"enabled": true,
"capabilities": {
"image": true,
"pdf": true,
"webSearch": true,
"toolCall": true,
"reasoning": true,
"imageGeneration": true
},
"pricing": {
"input": "<string>",
"output": "<string>",
"inputCacheRead": "<string>",
"inputCacheWrite": "<string>",
"reasoning": "<string>",
"image": "<string>",
"webSearch": "<string>",
"inputTiers": [
{
"cost": "<string>",
"min": 123,
"max": 123
}
],
"outputTiers": [
{
"cost": "<string>",
"min": 123,
"max": 123
}
],
"inputCacheReadTiers": [
{
"cost": "<string>",
"min": 123,
"max": 123
}
],
"inputCacheWriteTiers": [
{
"cost": "<string>",
"min": 123,
"max": 123
}
]
},
"rates": {
"inputRate": 1,
"outputRate": 1,
"cacheReadRate": 1,
"cacheWriteRate": 1,
"reasoningRate": 1,
"imageRate": 1,
"webSearchRate": 1
},
"isImageModel": true,
"defaultFor": [
"chatLg"
],
"testedAt": 123,
"ownedBy": "alibaba",
"modelType": "language",
"tags": [
"<string>"
],
"contextWindow": 123,
"maxTokens": 123,
"description": "<string>",
"i18nDescription": {
"en": "<string>",
"zh": "<string>"
},
"recommended": true,
"recommendedDescription": {
"en": "<string>",
"zh": "<string>"
}
}
],
"attachmentTransferMode": "url",
"modelDefinationMap": {}
}授权
响应
200 - application/json
Returns the configuration of ai.
此页面对您有帮助吗?

