cURL
curl --request POST \
--url https://app.teable.ai/api/space/%7BspaceId%7D/integration \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"type":"AI","enable":true,"config":{"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":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"rates":{"inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0},"isImageModel":true,"defaultFor":["chatLg"],"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string","i18nDescription":{"en":"string","zh":"string"},"recommended":true,"recommendedDescription":{"en":"string","zh":"string"}}],"capabilities":{"disableActions":["string"],"disableModelSelection":true},"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","aiGatewayApiKeys":["string"],"vertexByokCredential":{"project":"string","location":"string","googleCredentials":{"privateKey":"string","clientEmail":"string"}},"concurrencyGroups":[{"id":"string","name":"string","taskTypes":[],"keys":[],"perKey":5}],"concurrencyPerKey":1,"modelMappings":[{"sourceModelKey":"string","targetModelKey":"string","enabled":true,"createdTime":"string","lastModifiedTime":"string"}],"realtimeTranscription":{"enabled":true,"provider":"openai","apiKey":"string","endpoint":"http://example.com","model":"gpt-4o-mini-transcribe","status":"untested","testedAt":"string","maxSessionDurationSec":10,"sessionCreateLimitPerMinute":1},"appConfig":{"vercelToken":"string","customDomain":"string","deployProvider":"vercel","appAuth":{"google":{"clientId":"string","clientSecret":"string"},"emailOtp":{"smtp":{"senderName":"string","sender":"string","host":"string","port":0,"secure":true,"auth":{"user":"string","pass":"string"}}}},"badgeEnabled":true}}}'const url = 'https://app.teable.ai/api/space/%7BspaceId%7D/integration';
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"type":"AI","enable":true,"config":{"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":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"rates":{"inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0},"isImageModel":true,"defaultFor":["chatLg"],"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string","i18nDescription":{"en":"string","zh":"string"},"recommended":true,"recommendedDescription":{"en":"string","zh":"string"}}],"capabilities":{"disableActions":["string"],"disableModelSelection":true},"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","aiGatewayApiKeys":["string"],"vertexByokCredential":{"project":"string","location":"string","googleCredentials":{"privateKey":"string","clientEmail":"string"}},"concurrencyGroups":[{"id":"string","name":"string","taskTypes":[],"keys":[],"perKey":5}],"concurrencyPerKey":1,"modelMappings":[{"sourceModelKey":"string","targetModelKey":"string","enabled":true,"createdTime":"string","lastModifiedTime":"string"}],"realtimeTranscription":{"enabled":true,"provider":"openai","apiKey":"string","endpoint":"http://example.com","model":"gpt-4o-mini-transcribe","status":"untested","testedAt":"string","maxSessionDurationSec":10,"sessionCreateLimitPerMinute":1},"appConfig":{"vercelToken":"string","customDomain":"string","deployProvider":"vercel","appAuth":{"google":{"clientId":"string","clientSecret":"string"},"emailOtp":{"smtp":{"senderName":"string","sender":"string","host":"string","port":0,"secure":true,"auth":{"user":"string","pass":"string"}}}},"badgeEnabled":true}}}'
};
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: 'POST',
hostname: 'app.teable.ai',
port: null,
path: '/api/space/%7BspaceId%7D/integration',
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({
type: 'AI',
enable: true,
config: {
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: 0, max: 0}],
outputTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheReadTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheWriteTiers: [{cost: 'string', min: 0, max: 0}]
},
rates: {
inputRate: 0,
outputRate: 0,
cacheReadRate: 0,
cacheWriteRate: 0,
reasoningRate: 0,
imageRate: 0,
webSearchRate: 0
},
isImageModel: true,
defaultFor: ['chatLg'],
testedAt: 0,
ownedBy: 'alibaba',
modelType: 'language',
tags: ['string'],
contextWindow: 0,
maxTokens: 0,
description: 'string',
i18nDescription: {en: 'string', zh: 'string'},
recommended: true,
recommendedDescription: {en: 'string', zh: 'string'}
}
],
capabilities: {disableActions: ['string'], disableModelSelection: true},
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',
aiGatewayApiKeys: ['string'],
vertexByokCredential: {
project: 'string',
location: 'string',
googleCredentials: {privateKey: 'string', clientEmail: 'string'}
},
concurrencyGroups: [{id: 'string', name: 'string', taskTypes: [], keys: [], perKey: 5}],
concurrencyPerKey: 1,
modelMappings: [
{
sourceModelKey: 'string',
targetModelKey: 'string',
enabled: true,
createdTime: 'string',
lastModifiedTime: 'string'
}
],
realtimeTranscription: {
enabled: true,
provider: 'openai',
apiKey: 'string',
endpoint: 'http://example.com',
model: 'gpt-4o-mini-transcribe',
status: 'untested',
testedAt: 'string',
maxSessionDurationSec: 10,
sessionCreateLimitPerMinute: 1
},
appConfig: {
vercelToken: 'string',
customDomain: 'string',
deployProvider: 'vercel',
appAuth: {
google: {clientId: 'string', clientSecret: 'string'},
emailOtp: {
smtp: {
senderName: 'string',
sender: 'string',
host: 'string',
port: 0,
secure: true,
auth: {user: 'string', pass: 'string'}
}
}
},
badgeEnabled: true
}
}
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"type\":\"AI\",\"enable\":true,\"config\":{\"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\":0,\"max\":0}],\"outputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheReadTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheWriteTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}]},\"rates\":{\"inputRate\":0,\"outputRate\":0,\"cacheReadRate\":0,\"cacheWriteRate\":0,\"reasoningRate\":0,\"imageRate\":0,\"webSearchRate\":0},\"isImageModel\":true,\"defaultFor\":[\"chatLg\"],\"testedAt\":0,\"ownedBy\":\"alibaba\",\"modelType\":\"language\",\"tags\":[\"string\"],\"contextWindow\":0,\"maxTokens\":0,\"description\":\"string\",\"i18nDescription\":{\"en\":\"string\",\"zh\":\"string\"},\"recommended\":true,\"recommendedDescription\":{\"en\":\"string\",\"zh\":\"string\"}}],\"capabilities\":{\"disableActions\":[\"string\"],\"disableModelSelection\":true},\"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\",\"aiGatewayApiKeys\":[\"string\"],\"vertexByokCredential\":{\"project\":\"string\",\"location\":\"string\",\"googleCredentials\":{\"privateKey\":\"string\",\"clientEmail\":\"string\"}},\"concurrencyGroups\":[{\"id\":\"string\",\"name\":\"string\",\"taskTypes\":[],\"keys\":[],\"perKey\":5}],\"concurrencyPerKey\":1,\"modelMappings\":[{\"sourceModelKey\":\"string\",\"targetModelKey\":\"string\",\"enabled\":true,\"createdTime\":\"string\",\"lastModifiedTime\":\"string\"}],\"realtimeTranscription\":{\"enabled\":true,\"provider\":\"openai\",\"apiKey\":\"string\",\"endpoint\":\"http://example.com\",\"model\":\"gpt-4o-mini-transcribe\",\"status\":\"untested\",\"testedAt\":\"string\",\"maxSessionDurationSec\":10,\"sessionCreateLimitPerMinute\":1},\"appConfig\":{\"vercelToken\":\"string\",\"customDomain\":\"string\",\"deployProvider\":\"vercel\",\"appAuth\":{\"google\":{\"clientId\":\"string\",\"clientSecret\":\"string\"},\"emailOtp\":{\"smtp\":{\"senderName\":\"string\",\"sender\":\"string\",\"host\":\"string\",\"port\":0,\"secure\":true,\"auth\":{\"user\":\"string\",\"pass\":\"string\"}}}},\"badgeEnabled\":true}}}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/api/space/%7BspaceId%7D/integration", 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/space/{spaceId}/integration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'AI',
'config' => [
'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' => [
]
],
'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' => [
],
'testedAt' => 123,
'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' => [
'testedAt' => '<string>',
'testedOrigin' => '<string>'
],
'aiGatewayApiKeys' => [
'<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',
'testedAt' => '<string>',
'maxSessionDurationSec' => 305,
'sessionCreateLimitPerMinute' => 30.5
],
'appConfig' => [
'vercelToken' => '<string>',
'customDomain' => '<string>',
'appAuth' => [
'google' => [
'clientId' => '<string>',
'clientSecret' => '<string>'
],
'emailOtp' => [
]
],
'badgeEnabled' => true
]
],
'enable' => true
]),
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/space/{spaceId}/integration"
payload := strings.NewReader("{\n \"type\": \"AI\",\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\n \"xl\": \"<string>\",\n \"lg\": \"<string>\",\n \"md\": \"<string>\",\n \"sm\": \"<string>\",\n \"ability\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"hiddenTiers\": []\n },\n \"gatewayModels\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"enabled\": true,\n \"capabilities\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"pricing\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"inputCacheRead\": \"<string>\",\n \"inputCacheWrite\": \"<string>\",\n \"reasoning\": \"<string>\",\n \"image\": \"<string>\",\n \"webSearch\": \"<string>\",\n \"inputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"outputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheReadTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheWriteTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ]\n },\n \"rates\": {\n \"inputRate\": 1,\n \"outputRate\": 1,\n \"cacheReadRate\": 1,\n \"cacheWriteRate\": 1,\n \"reasoningRate\": 1,\n \"imageRate\": 1,\n \"webSearchRate\": 1\n },\n \"isImageModel\": true,\n \"defaultFor\": [],\n \"testedAt\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\",\n \"i18nDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n },\n \"recommended\": true,\n \"recommendedDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n }\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ],\n \"disableModelSelection\": true\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"aiGatewayApiKeys\": [\n \"<string>\"\n ],\n \"concurrencyGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"taskTypes\": [],\n \"keys\": [],\n \"perKey\": 5\n }\n ],\n \"concurrencyPerKey\": 50.5,\n \"modelMappings\": [\n {\n \"sourceModelKey\": \"<string>\",\n \"targetModelKey\": \"<string>\",\n \"enabled\": true,\n \"createdTime\": \"<string>\",\n \"lastModifiedTime\": \"<string>\"\n }\n ],\n \"realtimeTranscription\": {\n \"enabled\": true,\n \"provider\": \"openai\",\n \"apiKey\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"model\": \"gpt-4o-mini-transcribe\",\n \"testedAt\": \"<string>\",\n \"maxSessionDurationSec\": 305,\n \"sessionCreateLimitPerMinute\": 30.5\n },\n \"appConfig\": {\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"appAuth\": {\n \"google\": {\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\"\n },\n \"emailOtp\": {}\n },\n \"badgeEnabled\": true\n }\n },\n \"enable\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.teable.ai/api/space/{spaceId}/integration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"AI\",\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\n \"xl\": \"<string>\",\n \"lg\": \"<string>\",\n \"md\": \"<string>\",\n \"sm\": \"<string>\",\n \"ability\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"hiddenTiers\": []\n },\n \"gatewayModels\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"enabled\": true,\n \"capabilities\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"pricing\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"inputCacheRead\": \"<string>\",\n \"inputCacheWrite\": \"<string>\",\n \"reasoning\": \"<string>\",\n \"image\": \"<string>\",\n \"webSearch\": \"<string>\",\n \"inputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"outputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheReadTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheWriteTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ]\n },\n \"rates\": {\n \"inputRate\": 1,\n \"outputRate\": 1,\n \"cacheReadRate\": 1,\n \"cacheWriteRate\": 1,\n \"reasoningRate\": 1,\n \"imageRate\": 1,\n \"webSearchRate\": 1\n },\n \"isImageModel\": true,\n \"defaultFor\": [],\n \"testedAt\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\",\n \"i18nDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n },\n \"recommended\": true,\n \"recommendedDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n }\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ],\n \"disableModelSelection\": true\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"aiGatewayApiKeys\": [\n \"<string>\"\n ],\n \"concurrencyGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"taskTypes\": [],\n \"keys\": [],\n \"perKey\": 5\n }\n ],\n \"concurrencyPerKey\": 50.5,\n \"modelMappings\": [\n {\n \"sourceModelKey\": \"<string>\",\n \"targetModelKey\": \"<string>\",\n \"enabled\": true,\n \"createdTime\": \"<string>\",\n \"lastModifiedTime\": \"<string>\"\n }\n ],\n \"realtimeTranscription\": {\n \"enabled\": true,\n \"provider\": \"openai\",\n \"apiKey\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"model\": \"gpt-4o-mini-transcribe\",\n \"testedAt\": \"<string>\",\n \"maxSessionDurationSec\": 305,\n \"sessionCreateLimitPerMinute\": 30.5\n },\n \"appConfig\": {\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"appAuth\": {\n \"google\": {\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\"\n },\n \"emailOtp\": {}\n },\n \"badgeEnabled\": true\n }\n },\n \"enable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/space/{spaceId}/integration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"AI\",\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\n \"xl\": \"<string>\",\n \"lg\": \"<string>\",\n \"md\": \"<string>\",\n \"sm\": \"<string>\",\n \"ability\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"hiddenTiers\": []\n },\n \"gatewayModels\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"enabled\": true,\n \"capabilities\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"pricing\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"inputCacheRead\": \"<string>\",\n \"inputCacheWrite\": \"<string>\",\n \"reasoning\": \"<string>\",\n \"image\": \"<string>\",\n \"webSearch\": \"<string>\",\n \"inputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"outputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheReadTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheWriteTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ]\n },\n \"rates\": {\n \"inputRate\": 1,\n \"outputRate\": 1,\n \"cacheReadRate\": 1,\n \"cacheWriteRate\": 1,\n \"reasoningRate\": 1,\n \"imageRate\": 1,\n \"webSearchRate\": 1\n },\n \"isImageModel\": true,\n \"defaultFor\": [],\n \"testedAt\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\",\n \"i18nDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n },\n \"recommended\": true,\n \"recommendedDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n }\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ],\n \"disableModelSelection\": true\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"aiGatewayApiKeys\": [\n \"<string>\"\n ],\n \"concurrencyGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"taskTypes\": [],\n \"keys\": [],\n \"perKey\": 5\n }\n ],\n \"concurrencyPerKey\": 50.5,\n \"modelMappings\": [\n {\n \"sourceModelKey\": \"<string>\",\n \"targetModelKey\": \"<string>\",\n \"enabled\": true,\n \"createdTime\": \"<string>\",\n \"lastModifiedTime\": \"<string>\"\n }\n ],\n \"realtimeTranscription\": {\n \"enabled\": true,\n \"provider\": \"openai\",\n \"apiKey\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"model\": \"gpt-4o-mini-transcribe\",\n \"testedAt\": \"<string>\",\n \"maxSessionDurationSec\": 305,\n \"sessionCreateLimitPerMinute\": 30.5\n },\n \"appConfig\": {\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"appAuth\": {\n \"google\": {\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\"\n },\n \"emailOtp\": {}\n },\n \"badgeEnabled\": true\n }\n },\n \"enable\": true\n}"
response = http.request(request)
puts response.read_bodyspace
Post space integration
Create a integration to a space
Required token scopes: space|update
POST
/
space
/
{spaceId}
/
integration
cURL
curl --request POST \
--url https://app.teable.ai/api/space/%7BspaceId%7D/integration \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"type":"AI","enable":true,"config":{"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":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"rates":{"inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0},"isImageModel":true,"defaultFor":["chatLg"],"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string","i18nDescription":{"en":"string","zh":"string"},"recommended":true,"recommendedDescription":{"en":"string","zh":"string"}}],"capabilities":{"disableActions":["string"],"disableModelSelection":true},"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","aiGatewayApiKeys":["string"],"vertexByokCredential":{"project":"string","location":"string","googleCredentials":{"privateKey":"string","clientEmail":"string"}},"concurrencyGroups":[{"id":"string","name":"string","taskTypes":[],"keys":[],"perKey":5}],"concurrencyPerKey":1,"modelMappings":[{"sourceModelKey":"string","targetModelKey":"string","enabled":true,"createdTime":"string","lastModifiedTime":"string"}],"realtimeTranscription":{"enabled":true,"provider":"openai","apiKey":"string","endpoint":"http://example.com","model":"gpt-4o-mini-transcribe","status":"untested","testedAt":"string","maxSessionDurationSec":10,"sessionCreateLimitPerMinute":1},"appConfig":{"vercelToken":"string","customDomain":"string","deployProvider":"vercel","appAuth":{"google":{"clientId":"string","clientSecret":"string"},"emailOtp":{"smtp":{"senderName":"string","sender":"string","host":"string","port":0,"secure":true,"auth":{"user":"string","pass":"string"}}}},"badgeEnabled":true}}}'const url = 'https://app.teable.ai/api/space/%7BspaceId%7D/integration';
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"type":"AI","enable":true,"config":{"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":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"rates":{"inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0},"isImageModel":true,"defaultFor":["chatLg"],"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string","i18nDescription":{"en":"string","zh":"string"},"recommended":true,"recommendedDescription":{"en":"string","zh":"string"}}],"capabilities":{"disableActions":["string"],"disableModelSelection":true},"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","aiGatewayApiKeys":["string"],"vertexByokCredential":{"project":"string","location":"string","googleCredentials":{"privateKey":"string","clientEmail":"string"}},"concurrencyGroups":[{"id":"string","name":"string","taskTypes":[],"keys":[],"perKey":5}],"concurrencyPerKey":1,"modelMappings":[{"sourceModelKey":"string","targetModelKey":"string","enabled":true,"createdTime":"string","lastModifiedTime":"string"}],"realtimeTranscription":{"enabled":true,"provider":"openai","apiKey":"string","endpoint":"http://example.com","model":"gpt-4o-mini-transcribe","status":"untested","testedAt":"string","maxSessionDurationSec":10,"sessionCreateLimitPerMinute":1},"appConfig":{"vercelToken":"string","customDomain":"string","deployProvider":"vercel","appAuth":{"google":{"clientId":"string","clientSecret":"string"},"emailOtp":{"smtp":{"senderName":"string","sender":"string","host":"string","port":0,"secure":true,"auth":{"user":"string","pass":"string"}}}},"badgeEnabled":true}}}'
};
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: 'POST',
hostname: 'app.teable.ai',
port: null,
path: '/api/space/%7BspaceId%7D/integration',
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({
type: 'AI',
enable: true,
config: {
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: 0, max: 0}],
outputTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheReadTiers: [{cost: 'string', min: 0, max: 0}],
inputCacheWriteTiers: [{cost: 'string', min: 0, max: 0}]
},
rates: {
inputRate: 0,
outputRate: 0,
cacheReadRate: 0,
cacheWriteRate: 0,
reasoningRate: 0,
imageRate: 0,
webSearchRate: 0
},
isImageModel: true,
defaultFor: ['chatLg'],
testedAt: 0,
ownedBy: 'alibaba',
modelType: 'language',
tags: ['string'],
contextWindow: 0,
maxTokens: 0,
description: 'string',
i18nDescription: {en: 'string', zh: 'string'},
recommended: true,
recommendedDescription: {en: 'string', zh: 'string'}
}
],
capabilities: {disableActions: ['string'], disableModelSelection: true},
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',
aiGatewayApiKeys: ['string'],
vertexByokCredential: {
project: 'string',
location: 'string',
googleCredentials: {privateKey: 'string', clientEmail: 'string'}
},
concurrencyGroups: [{id: 'string', name: 'string', taskTypes: [], keys: [], perKey: 5}],
concurrencyPerKey: 1,
modelMappings: [
{
sourceModelKey: 'string',
targetModelKey: 'string',
enabled: true,
createdTime: 'string',
lastModifiedTime: 'string'
}
],
realtimeTranscription: {
enabled: true,
provider: 'openai',
apiKey: 'string',
endpoint: 'http://example.com',
model: 'gpt-4o-mini-transcribe',
status: 'untested',
testedAt: 'string',
maxSessionDurationSec: 10,
sessionCreateLimitPerMinute: 1
},
appConfig: {
vercelToken: 'string',
customDomain: 'string',
deployProvider: 'vercel',
appAuth: {
google: {clientId: 'string', clientSecret: 'string'},
emailOtp: {
smtp: {
senderName: 'string',
sender: 'string',
host: 'string',
port: 0,
secure: true,
auth: {user: 'string', pass: 'string'}
}
}
},
badgeEnabled: true
}
}
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"type\":\"AI\",\"enable\":true,\"config\":{\"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\":0,\"max\":0}],\"outputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheReadTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheWriteTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}]},\"rates\":{\"inputRate\":0,\"outputRate\":0,\"cacheReadRate\":0,\"cacheWriteRate\":0,\"reasoningRate\":0,\"imageRate\":0,\"webSearchRate\":0},\"isImageModel\":true,\"defaultFor\":[\"chatLg\"],\"testedAt\":0,\"ownedBy\":\"alibaba\",\"modelType\":\"language\",\"tags\":[\"string\"],\"contextWindow\":0,\"maxTokens\":0,\"description\":\"string\",\"i18nDescription\":{\"en\":\"string\",\"zh\":\"string\"},\"recommended\":true,\"recommendedDescription\":{\"en\":\"string\",\"zh\":\"string\"}}],\"capabilities\":{\"disableActions\":[\"string\"],\"disableModelSelection\":true},\"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\",\"aiGatewayApiKeys\":[\"string\"],\"vertexByokCredential\":{\"project\":\"string\",\"location\":\"string\",\"googleCredentials\":{\"privateKey\":\"string\",\"clientEmail\":\"string\"}},\"concurrencyGroups\":[{\"id\":\"string\",\"name\":\"string\",\"taskTypes\":[],\"keys\":[],\"perKey\":5}],\"concurrencyPerKey\":1,\"modelMappings\":[{\"sourceModelKey\":\"string\",\"targetModelKey\":\"string\",\"enabled\":true,\"createdTime\":\"string\",\"lastModifiedTime\":\"string\"}],\"realtimeTranscription\":{\"enabled\":true,\"provider\":\"openai\",\"apiKey\":\"string\",\"endpoint\":\"http://example.com\",\"model\":\"gpt-4o-mini-transcribe\",\"status\":\"untested\",\"testedAt\":\"string\",\"maxSessionDurationSec\":10,\"sessionCreateLimitPerMinute\":1},\"appConfig\":{\"vercelToken\":\"string\",\"customDomain\":\"string\",\"deployProvider\":\"vercel\",\"appAuth\":{\"google\":{\"clientId\":\"string\",\"clientSecret\":\"string\"},\"emailOtp\":{\"smtp\":{\"senderName\":\"string\",\"sender\":\"string\",\"host\":\"string\",\"port\":0,\"secure\":true,\"auth\":{\"user\":\"string\",\"pass\":\"string\"}}}},\"badgeEnabled\":true}}}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/api/space/%7BspaceId%7D/integration", 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/space/{spaceId}/integration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'AI',
'config' => [
'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' => [
]
],
'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' => [
],
'testedAt' => 123,
'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' => [
'testedAt' => '<string>',
'testedOrigin' => '<string>'
],
'aiGatewayApiKeys' => [
'<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',
'testedAt' => '<string>',
'maxSessionDurationSec' => 305,
'sessionCreateLimitPerMinute' => 30.5
],
'appConfig' => [
'vercelToken' => '<string>',
'customDomain' => '<string>',
'appAuth' => [
'google' => [
'clientId' => '<string>',
'clientSecret' => '<string>'
],
'emailOtp' => [
]
],
'badgeEnabled' => true
]
],
'enable' => true
]),
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/space/{spaceId}/integration"
payload := strings.NewReader("{\n \"type\": \"AI\",\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\n \"xl\": \"<string>\",\n \"lg\": \"<string>\",\n \"md\": \"<string>\",\n \"sm\": \"<string>\",\n \"ability\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"hiddenTiers\": []\n },\n \"gatewayModels\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"enabled\": true,\n \"capabilities\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"pricing\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"inputCacheRead\": \"<string>\",\n \"inputCacheWrite\": \"<string>\",\n \"reasoning\": \"<string>\",\n \"image\": \"<string>\",\n \"webSearch\": \"<string>\",\n \"inputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"outputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheReadTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheWriteTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ]\n },\n \"rates\": {\n \"inputRate\": 1,\n \"outputRate\": 1,\n \"cacheReadRate\": 1,\n \"cacheWriteRate\": 1,\n \"reasoningRate\": 1,\n \"imageRate\": 1,\n \"webSearchRate\": 1\n },\n \"isImageModel\": true,\n \"defaultFor\": [],\n \"testedAt\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\",\n \"i18nDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n },\n \"recommended\": true,\n \"recommendedDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n }\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ],\n \"disableModelSelection\": true\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"aiGatewayApiKeys\": [\n \"<string>\"\n ],\n \"concurrencyGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"taskTypes\": [],\n \"keys\": [],\n \"perKey\": 5\n }\n ],\n \"concurrencyPerKey\": 50.5,\n \"modelMappings\": [\n {\n \"sourceModelKey\": \"<string>\",\n \"targetModelKey\": \"<string>\",\n \"enabled\": true,\n \"createdTime\": \"<string>\",\n \"lastModifiedTime\": \"<string>\"\n }\n ],\n \"realtimeTranscription\": {\n \"enabled\": true,\n \"provider\": \"openai\",\n \"apiKey\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"model\": \"gpt-4o-mini-transcribe\",\n \"testedAt\": \"<string>\",\n \"maxSessionDurationSec\": 305,\n \"sessionCreateLimitPerMinute\": 30.5\n },\n \"appConfig\": {\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"appAuth\": {\n \"google\": {\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\"\n },\n \"emailOtp\": {}\n },\n \"badgeEnabled\": true\n }\n },\n \"enable\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.teable.ai/api/space/{spaceId}/integration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"AI\",\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\n \"xl\": \"<string>\",\n \"lg\": \"<string>\",\n \"md\": \"<string>\",\n \"sm\": \"<string>\",\n \"ability\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"hiddenTiers\": []\n },\n \"gatewayModels\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"enabled\": true,\n \"capabilities\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"pricing\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"inputCacheRead\": \"<string>\",\n \"inputCacheWrite\": \"<string>\",\n \"reasoning\": \"<string>\",\n \"image\": \"<string>\",\n \"webSearch\": \"<string>\",\n \"inputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"outputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheReadTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheWriteTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ]\n },\n \"rates\": {\n \"inputRate\": 1,\n \"outputRate\": 1,\n \"cacheReadRate\": 1,\n \"cacheWriteRate\": 1,\n \"reasoningRate\": 1,\n \"imageRate\": 1,\n \"webSearchRate\": 1\n },\n \"isImageModel\": true,\n \"defaultFor\": [],\n \"testedAt\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\",\n \"i18nDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n },\n \"recommended\": true,\n \"recommendedDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n }\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ],\n \"disableModelSelection\": true\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"aiGatewayApiKeys\": [\n \"<string>\"\n ],\n \"concurrencyGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"taskTypes\": [],\n \"keys\": [],\n \"perKey\": 5\n }\n ],\n \"concurrencyPerKey\": 50.5,\n \"modelMappings\": [\n {\n \"sourceModelKey\": \"<string>\",\n \"targetModelKey\": \"<string>\",\n \"enabled\": true,\n \"createdTime\": \"<string>\",\n \"lastModifiedTime\": \"<string>\"\n }\n ],\n \"realtimeTranscription\": {\n \"enabled\": true,\n \"provider\": \"openai\",\n \"apiKey\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"model\": \"gpt-4o-mini-transcribe\",\n \"testedAt\": \"<string>\",\n \"maxSessionDurationSec\": 305,\n \"sessionCreateLimitPerMinute\": 30.5\n },\n \"appConfig\": {\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"appAuth\": {\n \"google\": {\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\"\n },\n \"emailOtp\": {}\n },\n \"badgeEnabled\": true\n }\n },\n \"enable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/space/{spaceId}/integration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"AI\",\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\n \"xl\": \"<string>\",\n \"lg\": \"<string>\",\n \"md\": \"<string>\",\n \"sm\": \"<string>\",\n \"ability\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"hiddenTiers\": []\n },\n \"gatewayModels\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"enabled\": true,\n \"capabilities\": {\n \"image\": true,\n \"pdf\": true,\n \"webSearch\": true,\n \"toolCall\": true,\n \"reasoning\": true,\n \"imageGeneration\": true\n },\n \"pricing\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"inputCacheRead\": \"<string>\",\n \"inputCacheWrite\": \"<string>\",\n \"reasoning\": \"<string>\",\n \"image\": \"<string>\",\n \"webSearch\": \"<string>\",\n \"inputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"outputTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheReadTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ],\n \"inputCacheWriteTiers\": [\n {\n \"cost\": \"<string>\",\n \"min\": 123,\n \"max\": 123\n }\n ]\n },\n \"rates\": {\n \"inputRate\": 1,\n \"outputRate\": 1,\n \"cacheReadRate\": 1,\n \"cacheWriteRate\": 1,\n \"reasoningRate\": 1,\n \"imageRate\": 1,\n \"webSearchRate\": 1\n },\n \"isImageModel\": true,\n \"defaultFor\": [],\n \"testedAt\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\",\n \"i18nDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n },\n \"recommended\": true,\n \"recommendedDescription\": {\n \"en\": \"<string>\",\n \"zh\": \"<string>\"\n }\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ],\n \"disableModelSelection\": true\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"aiGatewayApiKeys\": [\n \"<string>\"\n ],\n \"concurrencyGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"taskTypes\": [],\n \"keys\": [],\n \"perKey\": 5\n }\n ],\n \"concurrencyPerKey\": 50.5,\n \"modelMappings\": [\n {\n \"sourceModelKey\": \"<string>\",\n \"targetModelKey\": \"<string>\",\n \"enabled\": true,\n \"createdTime\": \"<string>\",\n \"lastModifiedTime\": \"<string>\"\n }\n ],\n \"realtimeTranscription\": {\n \"enabled\": true,\n \"provider\": \"openai\",\n \"apiKey\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"model\": \"gpt-4o-mini-transcribe\",\n \"testedAt\": \"<string>\",\n \"maxSessionDurationSec\": 305,\n \"sessionCreateLimitPerMinute\": 30.5\n },\n \"appConfig\": {\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"appAuth\": {\n \"google\": {\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\"\n },\n \"emailOtp\": {}\n },\n \"badgeEnabled\": true\n }\n },\n \"enable\": true\n}"
response = http.request(request)
puts response.read_bodyAutorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parámetros de ruta
Cuerpo
application/json
Respuesta
200
Successful response.
Última modificación el 15 de septiembre de 2026
¿Esta página le ayudó?

