Save the OpenAI-compatible provider settings
import requests
url = "https://platform.ankra.app/api/v1/org/ai-settings/openai-compatible"
payload = {
"base_url": "<string>",
"api_key": "<string>",
"model": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base_url: '<string>', api_key: '<string>', model: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/ai-settings/openai-compatible', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/ai-settings/openai-compatible \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "<string>",
"api_key": "<string>",
"model": "<string>"
}
'{
"configured": true,
"base_url": "<string>",
"model": "<string>",
"key_preview": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}AI Settings
Save the OpenAI-compatible provider settings
Stores the organisation’s single OpenAI-compatible base URL, API key and model after a connectivity check. It does not switch the active provider. Requires the ai.manage permission.
POST
/
api
/
v1
/
org
/
ai-settings
/
openai-compatible
Save the OpenAI-compatible provider settings
import requests
url = "https://platform.ankra.app/api/v1/org/ai-settings/openai-compatible"
payload = {
"base_url": "<string>",
"api_key": "<string>",
"model": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base_url: '<string>', api_key: '<string>', model: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/ai-settings/openai-compatible', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/ai-settings/openai-compatible \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "<string>",
"api_key": "<string>",
"model": "<string>"
}
'{
"configured": true,
"base_url": "<string>",
"model": "<string>",
"key_preview": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json