cURL
curl --request PATCH \
--url https://app.teable.ai/api/admin/setting/ai-config \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"section":"llmApi","patch":{"llmProviders":[{"type":"openai","name":"string","displayName":"string","apiKey":"string","baseUrl":"http://example.com","models":"","isInstance":true,"modelConfigs":{"property1":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"},"property2":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"}}}],"aiGatewayApiKey":"string","aiGatewayBaseUrl":"http://example.com","attachmentTest":{"urlMode":{"success":true,"errorMessage":"string"},"base64Mode":{"success":true,"errorMessage":"string"},"testedAt":"string","testedOrigin":"string","recommendedMode":"url"},"attachmentTransferMode":"url"}}'const url = 'https://app.teable.ai/api/admin/setting/ai-config';
const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"section":"llmApi","patch":{"llmProviders":[{"type":"openai","name":"string","displayName":"string","apiKey":"string","baseUrl":"http://example.com","models":"","isInstance":true,"modelConfigs":{"property1":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"},"property2":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"}}}],"aiGatewayApiKey":"string","aiGatewayBaseUrl":"http://example.com","attachmentTest":{"urlMode":{"success":true,"errorMessage":"string"},"base64Mode":{"success":true,"errorMessage":"string"},"testedAt":"string","testedOrigin":"string","recommendedMode":"url"},"attachmentTransferMode":"url"}}'
};
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: 'PATCH',
hostname: 'app.teable.ai',
port: null,
path: '/api/admin/setting/ai-config',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
}
};
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.write(JSON.stringify({
section: 'llmApi',
patch: {
llmProviders: [
{
type: 'openai',
name: 'string',
displayName: 'string',
apiKey: 'string',
baseUrl: 'http://example.com',
models: '',
isInstance: true,
modelConfigs: {
property1: {
label: 'string',
pricing: {
input: 'string',
output: 'string',
inputCacheRead: 'string',
inputCacheWrite: 'string',
reasoning: 'string',
image: 'string',
webSearch: 'string',
inputTiers: [{cost: 'string', min: 0, max: 0}],
outputTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheReadTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheWriteTiers: [{cost: 'string', min: 0, max: 0}]
},
referenceModel: 'string',
inputRate: 0,
outputRate: 0,
cacheReadRate: 0,
cacheWriteRate: 0,
reasoningRate: 0,
imageRate: 0,
webSearchRate: 0,
isImageModel: true,
ability: {
image: true,
pdf: true,
webSearch: true,
toolCall: true,
reasoning: true,
imageGeneration: true
},
imageAbility: {generation: true, imageToImage: true},
testedAt: 0,
ownedBy: 'alibaba',
modelType: 'language',
tags: ['string'],
contextWindow: 0,
maxTokens: 0,
description: 'string'
},
property2: {
label: 'string',
pricing: {
input: 'string',
output: 'string',
inputCacheRead: 'string',
inputCacheWrite: 'string',
reasoning: 'string',
image: 'string',
webSearch: 'string',
inputTiers: [{cost: 'string', min: 0, max: 0}],
outputTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheReadTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheWriteTiers: [{cost: 'string', min: 0, max: 0}]
},
referenceModel: 'string',
inputRate: 0,
outputRate: 0,
cacheReadRate: 0,
cacheWriteRate: 0,
reasoningRate: 0,
imageRate: 0,
webSearchRate: 0,
isImageModel: true,
ability: {
image: true,
pdf: true,
webSearch: true,
toolCall: true,
reasoning: true,
imageGeneration: true
},
imageAbility: {generation: true, imageToImage: true},
testedAt: 0,
ownedBy: 'alibaba',
modelType: 'language',
tags: ['string'],
contextWindow: 0,
maxTokens: 0,
description: 'string'
}
}
}
],
aiGatewayApiKey: 'string',
aiGatewayBaseUrl: 'http://example.com',
attachmentTest: {
urlMode: {success: true, errorMessage: 'string'},
base64Mode: {success: true, errorMessage: 'string'},
testedAt: 'string',
testedOrigin: 'string',
recommendedMode: 'url'
},
attachmentTransferMode: 'url'
}
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"section\":\"llmApi\",\"patch\":{\"llmProviders\":[{\"type\":\"openai\",\"name\":\"string\",\"displayName\":\"string\",\"apiKey\":\"string\",\"baseUrl\":\"http://example.com\",\"models\":\"\",\"isInstance\":true,\"modelConfigs\":{\"property1\":{\"label\":\"string\",\"pricing\":{\"input\":\"string\",\"output\":\"string\",\"inputCacheRead\":\"string\",\"inputCacheWrite\":\"string\",\"reasoning\":\"string\",\"image\":\"string\",\"webSearch\":\"string\",\"inputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"outputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheReadTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheWriteTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}]},\"referenceModel\":\"string\",\"inputRate\":0,\"outputRate\":0,\"cacheReadRate\":0,\"cacheWriteRate\":0,\"reasoningRate\":0,\"imageRate\":0,\"webSearchRate\":0,\"isImageModel\":true,\"ability\":{\"image\":true,\"pdf\":true,\"webSearch\":true,\"toolCall\":true,\"reasoning\":true,\"imageGeneration\":true},\"imageAbility\":{\"generation\":true,\"imageToImage\":true},\"testedAt\":0,\"ownedBy\":\"alibaba\",\"modelType\":\"language\",\"tags\":[\"string\"],\"contextWindow\":0,\"maxTokens\":0,\"description\":\"string\"},\"property2\":{\"label\":\"string\",\"pricing\":{\"input\":\"string\",\"output\":\"string\",\"inputCacheRead\":\"string\",\"inputCacheWrite\":\"string\",\"reasoning\":\"string\",\"image\":\"string\",\"webSearch\":\"string\",\"inputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"outputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheReadTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheWriteTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}]},\"referenceModel\":\"string\",\"inputRate\":0,\"outputRate\":0,\"cacheReadRate\":0,\"cacheWriteRate\":0,\"reasoningRate\":0,\"imageRate\":0,\"webSearchRate\":0,\"isImageModel\":true,\"ability\":{\"image\":true,\"pdf\":true,\"webSearch\":true,\"toolCall\":true,\"reasoning\":true,\"imageGeneration\":true},\"imageAbility\":{\"generation\":true,\"imageToImage\":true},\"testedAt\":0,\"ownedBy\":\"alibaba\",\"modelType\":\"language\",\"tags\":[\"string\"],\"contextWindow\":0,\"maxTokens\":0,\"description\":\"string\"}}}],\"aiGatewayApiKey\":\"string\",\"aiGatewayBaseUrl\":\"http://example.com\",\"attachmentTest\":{\"urlMode\":{\"success\":true,\"errorMessage\":\"string\"},\"base64Mode\":{\"success\":true,\"errorMessage\":\"string\"},\"testedAt\":\"string\",\"testedOrigin\":\"string\",\"recommendedMode\":\"url\"},\"attachmentTransferMode\":\"url\"}}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("PATCH", "/api/admin/setting/ai-config", payload, 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/admin/setting/ai-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'section' => 'llmApi',
'patch' => [
'llmProviders' => [
[
'name' => '<string>',
'displayName' => '<string>',
'apiKey' => '<string>',
'baseUrl' => '<string>',
'models' => '',
'isInstance' => true,
'modelConfigs' => [
]
]
],
'aiGatewayApiKey' => '<string>',
'aiGatewayBaseUrl' => '<string>',
'attachmentTest' => [
'testedAt' => '<string>',
'testedOrigin' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.teable.ai/api/admin/setting/ai-config"
payload := strings.NewReader("{\n \"section\": \"llmApi\",\n \"patch\": {\n \"llmProviders\": [\n {\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"models\": \"\",\n \"isInstance\": true,\n \"modelConfigs\": {}\n }\n ],\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.teable.ai/api/admin/setting/ai-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"section\": \"llmApi\",\n \"patch\": {\n \"llmProviders\": [\n {\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"models\": \"\",\n \"isInstance\": true,\n \"modelConfigs\": {}\n }\n ],\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/admin/setting/ai-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"section\": \"llmApi\",\n \"patch\": {\n \"llmProviders\": [\n {\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"models\": \"\",\n \"isInstance\": true,\n \"modelConfigs\": {}\n }\n ],\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"aiConfig": {
"llmProviders": [],
"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"
},
"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>"
}
}
],
"capabilities": {
"disableActions": [
"<string>"
],
"disableModelSelection": true
},
"aiGatewayApiKey": "<string>",
"aiGatewayBaseUrl": "<string>",
"attachmentTest": {
"urlMode": {
"success": true,
"errorMessage": "<string>"
},
"base64Mode": {
"success": true,
"errorMessage": "<string>"
},
"testedAt": "<string>",
"testedOrigin": "<string>",
"recommendedMode": "url"
},
"attachmentTransferMode": "url",
"aiGatewayApiKeys": [
"<string>"
],
"vertexByokCredential": {
"project": "<string>",
"location": "<string>",
"googleCredentials": {
"privateKey": "<string>",
"clientEmail": "<string>"
}
},
"concurrencyGroups": [
{
"id": "<string>",
"name": "<string>",
"taskTypes": [],
"keys": [],
"perKey": 5
}
],
"concurrencyPerKey": 50.5,
"modelMappings": [
{
"sourceModelKey": "<string>",
"targetModelKey": "<string>",
"enabled": true,
"createdTime": "<string>",
"lastModifiedTime": "<string>"
}
],
"realtimeTranscription": {
"enabled": true,
"provider": "openai",
"apiKey": "<string>",
"endpoint": "<string>",
"model": "gpt-4o-mini-transcribe",
"status": "untested",
"testedAt": "<string>",
"maxSessionDurationSec": 305,
"sessionCreateLimitPerMinute": 30.5
},
"enable": true
}
}admin
Patch adminsettingai config
Update one AI configuration section
Required token scopes: instance|update
PATCH
/
admin
/
setting
/
ai-config
cURL
curl --request PATCH \
--url https://app.teable.ai/api/admin/setting/ai-config \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"section":"llmApi","patch":{"llmProviders":[{"type":"openai","name":"string","displayName":"string","apiKey":"string","baseUrl":"http://example.com","models":"","isInstance":true,"modelConfigs":{"property1":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"},"property2":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"}}}],"aiGatewayApiKey":"string","aiGatewayBaseUrl":"http://example.com","attachmentTest":{"urlMode":{"success":true,"errorMessage":"string"},"base64Mode":{"success":true,"errorMessage":"string"},"testedAt":"string","testedOrigin":"string","recommendedMode":"url"},"attachmentTransferMode":"url"}}'const url = 'https://app.teable.ai/api/admin/setting/ai-config';
const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"section":"llmApi","patch":{"llmProviders":[{"type":"openai","name":"string","displayName":"string","apiKey":"string","baseUrl":"http://example.com","models":"","isInstance":true,"modelConfigs":{"property1":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"},"property2":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"}}}],"aiGatewayApiKey":"string","aiGatewayBaseUrl":"http://example.com","attachmentTest":{"urlMode":{"success":true,"errorMessage":"string"},"base64Mode":{"success":true,"errorMessage":"string"},"testedAt":"string","testedOrigin":"string","recommendedMode":"url"},"attachmentTransferMode":"url"}}'
};
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: 'PATCH',
hostname: 'app.teable.ai',
port: null,
path: '/api/admin/setting/ai-config',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
}
};
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.write(JSON.stringify({
section: 'llmApi',
patch: {
llmProviders: [
{
type: 'openai',
name: 'string',
displayName: 'string',
apiKey: 'string',
baseUrl: 'http://example.com',
models: '',
isInstance: true,
modelConfigs: {
property1: {
label: 'string',
pricing: {
input: 'string',
output: 'string',
inputCacheRead: 'string',
inputCacheWrite: 'string',
reasoning: 'string',
image: 'string',
webSearch: 'string',
inputTiers: [{cost: 'string', min: 0, max: 0}],
outputTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheReadTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheWriteTiers: [{cost: 'string', min: 0, max: 0}]
},
referenceModel: 'string',
inputRate: 0,
outputRate: 0,
cacheReadRate: 0,
cacheWriteRate: 0,
reasoningRate: 0,
imageRate: 0,
webSearchRate: 0,
isImageModel: true,
ability: {
image: true,
pdf: true,
webSearch: true,
toolCall: true,
reasoning: true,
imageGeneration: true
},
imageAbility: {generation: true, imageToImage: true},
testedAt: 0,
ownedBy: 'alibaba',
modelType: 'language',
tags: ['string'],
contextWindow: 0,
maxTokens: 0,
description: 'string'
},
property2: {
label: 'string',
pricing: {
input: 'string',
output: 'string',
inputCacheRead: 'string',
inputCacheWrite: 'string',
reasoning: 'string',
image: 'string',
webSearch: 'string',
inputTiers: [{cost: 'string', min: 0, max: 0}],
outputTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheReadTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheWriteTiers: [{cost: 'string', min: 0, max: 0}]
},
referenceModel: 'string',
inputRate: 0,
outputRate: 0,
cacheReadRate: 0,
cacheWriteRate: 0,
reasoningRate: 0,
imageRate: 0,
webSearchRate: 0,
isImageModel: true,
ability: {
image: true,
pdf: true,
webSearch: true,
toolCall: true,
reasoning: true,
imageGeneration: true
},
imageAbility: {generation: true, imageToImage: true},
testedAt: 0,
ownedBy: 'alibaba',
modelType: 'language',
tags: ['string'],
contextWindow: 0,
maxTokens: 0,
description: 'string'
}
}
}
],
aiGatewayApiKey: 'string',
aiGatewayBaseUrl: 'http://example.com',
attachmentTest: {
urlMode: {success: true, errorMessage: 'string'},
base64Mode: {success: true, errorMessage: 'string'},
testedAt: 'string',
testedOrigin: 'string',
recommendedMode: 'url'
},
attachmentTransferMode: 'url'
}
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"section\":\"llmApi\",\"patch\":{\"llmProviders\":[{\"type\":\"openai\",\"name\":\"string\",\"displayName\":\"string\",\"apiKey\":\"string\",\"baseUrl\":\"http://example.com\",\"models\":\"\",\"isInstance\":true,\"modelConfigs\":{\"property1\":{\"label\":\"string\",\"pricing\":{\"input\":\"string\",\"output\":\"string\",\"inputCacheRead\":\"string\",\"inputCacheWrite\":\"string\",\"reasoning\":\"string\",\"image\":\"string\",\"webSearch\":\"string\",\"inputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"outputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheReadTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheWriteTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}]},\"referenceModel\":\"string\",\"inputRate\":0,\"outputRate\":0,\"cacheReadRate\":0,\"cacheWriteRate\":0,\"reasoningRate\":0,\"imageRate\":0,\"webSearchRate\":0,\"isImageModel\":true,\"ability\":{\"image\":true,\"pdf\":true,\"webSearch\":true,\"toolCall\":true,\"reasoning\":true,\"imageGeneration\":true},\"imageAbility\":{\"generation\":true,\"imageToImage\":true},\"testedAt\":0,\"ownedBy\":\"alibaba\",\"modelType\":\"language\",\"tags\":[\"string\"],\"contextWindow\":0,\"maxTokens\":0,\"description\":\"string\"},\"property2\":{\"label\":\"string\",\"pricing\":{\"input\":\"string\",\"output\":\"string\",\"inputCacheRead\":\"string\",\"inputCacheWrite\":\"string\",\"reasoning\":\"string\",\"image\":\"string\",\"webSearch\":\"string\",\"inputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"outputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheReadTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheWriteTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}]},\"referenceModel\":\"string\",\"inputRate\":0,\"outputRate\":0,\"cacheReadRate\":0,\"cacheWriteRate\":0,\"reasoningRate\":0,\"imageRate\":0,\"webSearchRate\":0,\"isImageModel\":true,\"ability\":{\"image\":true,\"pdf\":true,\"webSearch\":true,\"toolCall\":true,\"reasoning\":true,\"imageGeneration\":true},\"imageAbility\":{\"generation\":true,\"imageToImage\":true},\"testedAt\":0,\"ownedBy\":\"alibaba\",\"modelType\":\"language\",\"tags\":[\"string\"],\"contextWindow\":0,\"maxTokens\":0,\"description\":\"string\"}}}],\"aiGatewayApiKey\":\"string\",\"aiGatewayBaseUrl\":\"http://example.com\",\"attachmentTest\":{\"urlMode\":{\"success\":true,\"errorMessage\":\"string\"},\"base64Mode\":{\"success\":true,\"errorMessage\":\"string\"},\"testedAt\":\"string\",\"testedOrigin\":\"string\",\"recommendedMode\":\"url\"},\"attachmentTransferMode\":\"url\"}}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("PATCH", "/api/admin/setting/ai-config", payload, 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/admin/setting/ai-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'section' => 'llmApi',
'patch' => [
'llmProviders' => [
[
'name' => '<string>',
'displayName' => '<string>',
'apiKey' => '<string>',
'baseUrl' => '<string>',
'models' => '',
'isInstance' => true,
'modelConfigs' => [
]
]
],
'aiGatewayApiKey' => '<string>',
'aiGatewayBaseUrl' => '<string>',
'attachmentTest' => [
'testedAt' => '<string>',
'testedOrigin' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.teable.ai/api/admin/setting/ai-config"
payload := strings.NewReader("{\n \"section\": \"llmApi\",\n \"patch\": {\n \"llmProviders\": [\n {\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"models\": \"\",\n \"isInstance\": true,\n \"modelConfigs\": {}\n }\n ],\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.teable.ai/api/admin/setting/ai-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"section\": \"llmApi\",\n \"patch\": {\n \"llmProviders\": [\n {\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"models\": \"\",\n \"isInstance\": true,\n \"modelConfigs\": {}\n }\n ],\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/admin/setting/ai-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"section\": \"llmApi\",\n \"patch\": {\n \"llmProviders\": [\n {\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"models\": \"\",\n \"isInstance\": true,\n \"modelConfigs\": {}\n }\n ],\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"aiConfig": {
"llmProviders": [],
"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"
},
"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>"
}
}
],
"capabilities": {
"disableActions": [
"<string>"
],
"disableModelSelection": true
},
"aiGatewayApiKey": "<string>",
"aiGatewayBaseUrl": "<string>",
"attachmentTest": {
"urlMode": {
"success": true,
"errorMessage": "<string>"
},
"base64Mode": {
"success": true,
"errorMessage": "<string>"
},
"testedAt": "<string>",
"testedOrigin": "<string>",
"recommendedMode": "url"
},
"attachmentTransferMode": "url",
"aiGatewayApiKeys": [
"<string>"
],
"vertexByokCredential": {
"project": "<string>",
"location": "<string>",
"googleCredentials": {
"privateKey": "<string>",
"clientEmail": "<string>"
}
},
"concurrencyGroups": [
{
"id": "<string>",
"name": "<string>",
"taskTypes": [],
"keys": [],
"perKey": 5
}
],
"concurrencyPerKey": 50.5,
"modelMappings": [
{
"sourceModelKey": "<string>",
"targetModelKey": "<string>",
"enabled": true,
"createdTime": "<string>",
"lastModifiedTime": "<string>"
}
],
"realtimeTranscription": {
"enabled": true,
"provider": "openai",
"apiKey": "<string>",
"endpoint": "<string>",
"model": "gpt-4o-mini-transcribe",
"status": "untested",
"testedAt": "<string>",
"maxSessionDurationSec": 305,
"sessionCreateLimitPerMinute": 30.5
},
"enable": true
}
}Yetkilendirmeler
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Gövde
application/json
Yanıt
200 - application/json
Update AI configuration section successfully.
Show child attributes
Show child attributes
Son değiştirilme tarihi 15 Eylül 2026
Bu sayfa yararlı mıydı?

