cURL
curl --request PATCH \
--url https://app.teable.ai/api/space/%7BspaceId%7D/integration/%7BintegrationId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"enable":true,"config":{"llmProviders":[],"embeddingModel":"string","translationModel":"string","chatModel":{"lg":"string","md":"string","sm":"string","ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":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"},"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":["reasoning"],"contextWindow":0,"maxTokens":0,"description":"string"}],"capabilities":{"disableActions":["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","aiGatewayApiKeys":["string"],"vertexByokCredential":{"project":"string","location":"string","googleCredentials":{"privateKey":"string","clientEmail":"string"}},"concurrencyGroups":[{"id":"string","name":"string","taskTypes":[],"keys":[],"perKey":5}],"concurrencyPerKey":1,"appConfig":{"apiKey":"string","vercelToken":"string","customDomain":"string","creditCount":0,"v0BaseUrl":"http://example.com","vercelBaseUrl":"http://example.com"}}}'const url = 'https://app.teable.ai/api/space/%7BspaceId%7D/integration/%7BintegrationId%7D';
const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"enable":true,"config":{"llmProviders":[],"embeddingModel":"string","translationModel":"string","chatModel":{"lg":"string","md":"string","sm":"string","ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":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"},"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":["reasoning"],"contextWindow":0,"maxTokens":0,"description":"string"}],"capabilities":{"disableActions":["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","aiGatewayApiKeys":["string"],"vertexByokCredential":{"project":"string","location":"string","googleCredentials":{"privateKey":"string","clientEmail":"string"}},"concurrencyGroups":[{"id":"string","name":"string","taskTypes":[],"keys":[],"perKey":5}],"concurrencyPerKey":1,"appConfig":{"apiKey":"string","vercelToken":"string","customDomain":"string","creditCount":0,"v0BaseUrl":"http://example.com","vercelBaseUrl":"http://example.com"}}}'
};
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/space/%7BspaceId%7D/integration/%7BintegrationId%7D',
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({
enable: true,
config: {
llmProviders: [],
embeddingModel: 'string',
translationModel: 'string',
chatModel: {
lg: 'string',
md: 'string',
sm: 'string',
ability: {
image: true,
pdf: true,
webSearch: true,
toolCall: true,
reasoning: true,
imageGeneration: 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'
},
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: ['reasoning'],
contextWindow: 0,
maxTokens: 0,
description: 'string'
}
],
capabilities: {disableActions: ['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',
aiGatewayApiKeys: ['string'],
vertexByokCredential: {
project: 'string',
location: 'string',
googleCredentials: {privateKey: 'string', clientEmail: 'string'}
},
concurrencyGroups: [{id: 'string', name: 'string', taskTypes: [], keys: [], perKey: 5}],
concurrencyPerKey: 1,
appConfig: {
apiKey: 'string',
vercelToken: 'string',
customDomain: 'string',
creditCount: 0,
v0BaseUrl: 'http://example.com',
vercelBaseUrl: 'http://example.com'
}
}
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"enable\":true,\"config\":{\"llmProviders\":[],\"embeddingModel\":\"string\",\"translationModel\":\"string\",\"chatModel\":{\"lg\":\"string\",\"md\":\"string\",\"sm\":\"string\",\"ability\":{\"image\":true,\"pdf\":true,\"webSearch\":true,\"toolCall\":true,\"reasoning\":true,\"imageGeneration\":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\"},\"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\":[\"reasoning\"],\"contextWindow\":0,\"maxTokens\":0,\"description\":\"string\"}],\"capabilities\":{\"disableActions\":[\"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\",\"aiGatewayApiKeys\":[\"string\"],\"vertexByokCredential\":{\"project\":\"string\",\"location\":\"string\",\"googleCredentials\":{\"privateKey\":\"string\",\"clientEmail\":\"string\"}},\"concurrencyGroups\":[{\"id\":\"string\",\"name\":\"string\",\"taskTypes\":[],\"keys\":[],\"perKey\":5}],\"concurrencyPerKey\":1,\"appConfig\":{\"apiKey\":\"string\",\"vercelToken\":\"string\",\"customDomain\":\"string\",\"creditCount\":0,\"v0BaseUrl\":\"http://example.com\",\"vercelBaseUrl\":\"http://example.com\"}}}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("PATCH", "/api/space/%7BspaceId%7D/integration/%7BintegrationId%7D", 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/{integrationId}",
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([
'enable' => true,
'config' => [
'llmProviders' => [
],
'embeddingModel' => '<string>',
'translationModel' => '<string>',
'chatModel' => [
'lg' => '<string>',
'md' => '<string>',
'sm' => '<string>',
'ability' => [
'image' => true,
'pdf' => true,
'webSearch' => true,
'toolCall' => true,
'reasoning' => true,
'imageGeneration' => 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>'
],
'rates' => [
'inputRate' => 1,
'outputRate' => 1,
'cacheReadRate' => 1,
'cacheWriteRate' => 1,
'reasoningRate' => 1,
'imageRate' => 1,
'webSearchRate' => 1
],
'isImageModel' => true,
'defaultFor' => [
],
'testedAt' => 123,
'tags' => [
],
'contextWindow' => 123,
'maxTokens' => 123,
'description' => '<string>'
]
],
'capabilities' => [
'disableActions' => [
'<string>'
]
],
'aiGatewayApiKey' => '<string>',
'aiGatewayBaseUrl' => '<string>',
'attachmentTest' => [
'testedAt' => '<string>',
'testedOrigin' => '<string>'
],
'attachmentTransferMode' => 'url',
'aiGatewayApiKeys' => [
'<string>'
],
'concurrencyGroups' => [
[
'id' => '<string>',
'name' => '<string>',
'taskTypes' => [
],
'keys' => [
],
'perKey' => 5
]
],
'concurrencyPerKey' => 50.5,
'appConfig' => [
'apiKey' => '<string>',
'vercelToken' => '<string>',
'customDomain' => '<string>',
'creditCount' => 1,
'v0BaseUrl' => '<string>',
'vercelBaseUrl' => '<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/space/{spaceId}/integration/{integrationId}"
payload := strings.NewReader("{\n \"enable\": true,\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\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 },\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 },\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 \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\"\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ]\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"attachmentTransferMode\": \"url\",\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 \"appConfig\": {\n \"apiKey\": \"<string>\",\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"creditCount\": 1,\n \"v0BaseUrl\": \"<string>\",\n \"vercelBaseUrl\": \"<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/space/{spaceId}/integration/{integrationId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enable\": true,\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\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 },\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 },\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 \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\"\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ]\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"attachmentTransferMode\": \"url\",\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 \"appConfig\": {\n \"apiKey\": \"<string>\",\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"creditCount\": 1,\n \"v0BaseUrl\": \"<string>\",\n \"vercelBaseUrl\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/space/{spaceId}/integration/{integrationId}")
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 \"enable\": true,\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\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 },\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 },\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 \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\"\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ]\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"attachmentTransferMode\": \"url\",\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 \"appConfig\": {\n \"apiKey\": \"<string>\",\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"creditCount\": 1,\n \"v0BaseUrl\": \"<string>\",\n \"vercelBaseUrl\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyspace
Patch space integration
Update a integration to a space
PATCH
/
space
/
{spaceId}
/
integration
/
{integrationId}
cURL
curl --request PATCH \
--url https://app.teable.ai/api/space/%7BspaceId%7D/integration/%7BintegrationId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"enable":true,"config":{"llmProviders":[],"embeddingModel":"string","translationModel":"string","chatModel":{"lg":"string","md":"string","sm":"string","ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":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"},"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":["reasoning"],"contextWindow":0,"maxTokens":0,"description":"string"}],"capabilities":{"disableActions":["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","aiGatewayApiKeys":["string"],"vertexByokCredential":{"project":"string","location":"string","googleCredentials":{"privateKey":"string","clientEmail":"string"}},"concurrencyGroups":[{"id":"string","name":"string","taskTypes":[],"keys":[],"perKey":5}],"concurrencyPerKey":1,"appConfig":{"apiKey":"string","vercelToken":"string","customDomain":"string","creditCount":0,"v0BaseUrl":"http://example.com","vercelBaseUrl":"http://example.com"}}}'const url = 'https://app.teable.ai/api/space/%7BspaceId%7D/integration/%7BintegrationId%7D';
const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"enable":true,"config":{"llmProviders":[],"embeddingModel":"string","translationModel":"string","chatModel":{"lg":"string","md":"string","sm":"string","ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":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"},"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":["reasoning"],"contextWindow":0,"maxTokens":0,"description":"string"}],"capabilities":{"disableActions":["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","aiGatewayApiKeys":["string"],"vertexByokCredential":{"project":"string","location":"string","googleCredentials":{"privateKey":"string","clientEmail":"string"}},"concurrencyGroups":[{"id":"string","name":"string","taskTypes":[],"keys":[],"perKey":5}],"concurrencyPerKey":1,"appConfig":{"apiKey":"string","vercelToken":"string","customDomain":"string","creditCount":0,"v0BaseUrl":"http://example.com","vercelBaseUrl":"http://example.com"}}}'
};
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/space/%7BspaceId%7D/integration/%7BintegrationId%7D',
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({
enable: true,
config: {
llmProviders: [],
embeddingModel: 'string',
translationModel: 'string',
chatModel: {
lg: 'string',
md: 'string',
sm: 'string',
ability: {
image: true,
pdf: true,
webSearch: true,
toolCall: true,
reasoning: true,
imageGeneration: 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'
},
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: ['reasoning'],
contextWindow: 0,
maxTokens: 0,
description: 'string'
}
],
capabilities: {disableActions: ['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',
aiGatewayApiKeys: ['string'],
vertexByokCredential: {
project: 'string',
location: 'string',
googleCredentials: {privateKey: 'string', clientEmail: 'string'}
},
concurrencyGroups: [{id: 'string', name: 'string', taskTypes: [], keys: [], perKey: 5}],
concurrencyPerKey: 1,
appConfig: {
apiKey: 'string',
vercelToken: 'string',
customDomain: 'string',
creditCount: 0,
v0BaseUrl: 'http://example.com',
vercelBaseUrl: 'http://example.com'
}
}
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"enable\":true,\"config\":{\"llmProviders\":[],\"embeddingModel\":\"string\",\"translationModel\":\"string\",\"chatModel\":{\"lg\":\"string\",\"md\":\"string\",\"sm\":\"string\",\"ability\":{\"image\":true,\"pdf\":true,\"webSearch\":true,\"toolCall\":true,\"reasoning\":true,\"imageGeneration\":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\"},\"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\":[\"reasoning\"],\"contextWindow\":0,\"maxTokens\":0,\"description\":\"string\"}],\"capabilities\":{\"disableActions\":[\"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\",\"aiGatewayApiKeys\":[\"string\"],\"vertexByokCredential\":{\"project\":\"string\",\"location\":\"string\",\"googleCredentials\":{\"privateKey\":\"string\",\"clientEmail\":\"string\"}},\"concurrencyGroups\":[{\"id\":\"string\",\"name\":\"string\",\"taskTypes\":[],\"keys\":[],\"perKey\":5}],\"concurrencyPerKey\":1,\"appConfig\":{\"apiKey\":\"string\",\"vercelToken\":\"string\",\"customDomain\":\"string\",\"creditCount\":0,\"v0BaseUrl\":\"http://example.com\",\"vercelBaseUrl\":\"http://example.com\"}}}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("PATCH", "/api/space/%7BspaceId%7D/integration/%7BintegrationId%7D", 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/{integrationId}",
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([
'enable' => true,
'config' => [
'llmProviders' => [
],
'embeddingModel' => '<string>',
'translationModel' => '<string>',
'chatModel' => [
'lg' => '<string>',
'md' => '<string>',
'sm' => '<string>',
'ability' => [
'image' => true,
'pdf' => true,
'webSearch' => true,
'toolCall' => true,
'reasoning' => true,
'imageGeneration' => 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>'
],
'rates' => [
'inputRate' => 1,
'outputRate' => 1,
'cacheReadRate' => 1,
'cacheWriteRate' => 1,
'reasoningRate' => 1,
'imageRate' => 1,
'webSearchRate' => 1
],
'isImageModel' => true,
'defaultFor' => [
],
'testedAt' => 123,
'tags' => [
],
'contextWindow' => 123,
'maxTokens' => 123,
'description' => '<string>'
]
],
'capabilities' => [
'disableActions' => [
'<string>'
]
],
'aiGatewayApiKey' => '<string>',
'aiGatewayBaseUrl' => '<string>',
'attachmentTest' => [
'testedAt' => '<string>',
'testedOrigin' => '<string>'
],
'attachmentTransferMode' => 'url',
'aiGatewayApiKeys' => [
'<string>'
],
'concurrencyGroups' => [
[
'id' => '<string>',
'name' => '<string>',
'taskTypes' => [
],
'keys' => [
],
'perKey' => 5
]
],
'concurrencyPerKey' => 50.5,
'appConfig' => [
'apiKey' => '<string>',
'vercelToken' => '<string>',
'customDomain' => '<string>',
'creditCount' => 1,
'v0BaseUrl' => '<string>',
'vercelBaseUrl' => '<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/space/{spaceId}/integration/{integrationId}"
payload := strings.NewReader("{\n \"enable\": true,\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\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 },\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 },\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 \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\"\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ]\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"attachmentTransferMode\": \"url\",\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 \"appConfig\": {\n \"apiKey\": \"<string>\",\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"creditCount\": 1,\n \"v0BaseUrl\": \"<string>\",\n \"vercelBaseUrl\": \"<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/space/{spaceId}/integration/{integrationId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enable\": true,\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\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 },\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 },\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 \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\"\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ]\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"attachmentTransferMode\": \"url\",\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 \"appConfig\": {\n \"apiKey\": \"<string>\",\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"creditCount\": 1,\n \"v0BaseUrl\": \"<string>\",\n \"vercelBaseUrl\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/space/{spaceId}/integration/{integrationId}")
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 \"enable\": true,\n \"config\": {\n \"llmProviders\": [],\n \"embeddingModel\": \"<string>\",\n \"translationModel\": \"<string>\",\n \"chatModel\": {\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 },\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 },\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 \"contextWindow\": 123,\n \"maxTokens\": 123,\n \"description\": \"<string>\"\n }\n ],\n \"capabilities\": {\n \"disableActions\": [\n \"<string>\"\n ]\n },\n \"aiGatewayApiKey\": \"<string>\",\n \"aiGatewayBaseUrl\": \"<string>\",\n \"attachmentTest\": {\n \"testedAt\": \"<string>\",\n \"testedOrigin\": \"<string>\"\n },\n \"attachmentTransferMode\": \"url\",\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 \"appConfig\": {\n \"apiKey\": \"<string>\",\n \"vercelToken\": \"<string>\",\n \"customDomain\": \"<string>\",\n \"creditCount\": 1,\n \"v0BaseUrl\": \"<string>\",\n \"vercelBaseUrl\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body最后修改于 2026年3月5日
此页面对您有帮助吗?
⌘I

