curl --request PUT \
--url https://hiimpria.ai/api/admin/aimodel/{id} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"name": "<string>",
"institution": "<string>",
"description": "<string>",
"api_url": "<string>",
"api_key": "<string>",
"default_headers": {},
"features": {
"stream": false,
"tools": false,
"code": false,
"vision": false,
"mcp": false
},
"input_media": {
"text": true,
"image": false,
"audio": false,
"video": false,
"pdf": false
},
"output_media": {
"text": true,
"audio": false,
"video": false,
"image": false
},
"max_input_tokens": 123,
"max_output_tokens": 123,
"extended_context": true,
"picture_url": "<string>"
}
'import requests
url = "https://hiimpria.ai/api/admin/aimodel/{id}"
payload = {
"name": "<string>",
"institution": "<string>",
"description": "<string>",
"api_url": "<string>",
"api_key": "<string>",
"default_headers": {},
"features": {
"stream": False,
"tools": False,
"code": False,
"vision": False,
"mcp": False
},
"input_media": {
"text": True,
"image": False,
"audio": False,
"video": False,
"pdf": False
},
"output_media": {
"text": True,
"audio": False,
"video": False,
"image": False
},
"max_input_tokens": 123,
"max_output_tokens": 123,
"extended_context": True,
"picture_url": "<string>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
institution: '<string>',
description: '<string>',
api_url: '<string>',
api_key: '<string>',
default_headers: {},
features: {stream: false, tools: false, code: false, vision: false, mcp: false},
input_media: {text: true, image: false, audio: false, video: false, pdf: false},
output_media: {text: true, audio: false, video: false, image: false},
max_input_tokens: 123,
max_output_tokens: 123,
extended_context: true,
picture_url: '<string>'
})
};
fetch('https://hiimpria.ai/api/admin/aimodel/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hiimpria.ai/api/admin/aimodel/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'institution' => '<string>',
'description' => '<string>',
'api_url' => '<string>',
'api_key' => '<string>',
'default_headers' => [
],
'features' => [
'stream' => false,
'tools' => false,
'code' => false,
'vision' => false,
'mcp' => false
],
'input_media' => [
'text' => true,
'image' => false,
'audio' => false,
'video' => false,
'pdf' => false
],
'output_media' => [
'text' => true,
'audio' => false,
'video' => false,
'image' => false
],
'max_input_tokens' => 123,
'max_output_tokens' => 123,
'extended_context' => true,
'picture_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$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://hiimpria.ai/api/admin/aimodel/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"description\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<string>\",\n \"default_headers\": {},\n \"features\": {\n \"stream\": false,\n \"tools\": false,\n \"code\": false,\n \"vision\": false,\n \"mcp\": false\n },\n \"input_media\": {\n \"text\": true,\n \"image\": false,\n \"audio\": false,\n \"video\": false,\n \"pdf\": false\n },\n \"output_media\": {\n \"text\": true,\n \"audio\": false,\n \"video\": false,\n \"image\": false\n },\n \"max_input_tokens\": 123,\n \"max_output_tokens\": 123,\n \"extended_context\": true,\n \"picture_url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
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.put("https://hiimpria.ai/api/admin/aimodel/{id}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"description\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<string>\",\n \"default_headers\": {},\n \"features\": {\n \"stream\": false,\n \"tools\": false,\n \"code\": false,\n \"vision\": false,\n \"mcp\": false\n },\n \"input_media\": {\n \"text\": true,\n \"image\": false,\n \"audio\": false,\n \"video\": false,\n \"pdf\": false\n },\n \"output_media\": {\n \"text\": true,\n \"audio\": false,\n \"video\": false,\n \"image\": false\n },\n \"max_input_tokens\": 123,\n \"max_output_tokens\": 123,\n \"extended_context\": true,\n \"picture_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/admin/aimodel/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"description\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<string>\",\n \"default_headers\": {},\n \"features\": {\n \"stream\": false,\n \"tools\": false,\n \"code\": false,\n \"vision\": false,\n \"mcp\": false\n },\n \"input_media\": {\n \"text\": true,\n \"image\": false,\n \"audio\": false,\n \"video\": false,\n \"pdf\": false\n },\n \"output_media\": {\n \"text\": true,\n \"audio\": false,\n \"video\": false,\n \"image\": false\n },\n \"max_input_tokens\": 123,\n \"max_output_tokens\": 123,\n \"extended_context\": true,\n \"picture_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "User institution deleted successfully"
}Update AI model
Partially updates an existing AI model configuration. Only fields present in the request body are written. The handler merges client_library / api_url / api_key with the stored document and re-validates the resulting combination before persisting when the model is active after the update. The api_key is write-only; an empty string, an omitted key or the masked placeholder •••••••• keeps the stored key, null clears it, and any other value replaces it. A change of model_use or client_library must give a pair that is offered (see the create), and writes both fields; a type or a library sent as null counts as conversationModel / openai_cli. An update that leaves the stored pair as it is writes neither and is accepted whatever the pair, so a model saved earlier with a pair no longer offered keeps working and can still be renamed, given a key, switched on or off, made its Digital Twin’s default or removed. A move to another Digital Twin (institution) is checked like a create, even when the pair is unchanged. The key and address rules (see the create) apply only when the model is active after the update — switching a model off or marking it deleted (status inactive or deleted) is never refused by them. Among them, a bedrock_cli model left active by an update needs a complete AWS key pair on the Digital Twin or on its account. A google_cli model left active by an update with neither api_url nor api_key needs the Digital Twin’s own Gemini API key.
curl --request PUT \
--url https://hiimpria.ai/api/admin/aimodel/{id} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"name": "<string>",
"institution": "<string>",
"description": "<string>",
"api_url": "<string>",
"api_key": "<string>",
"default_headers": {},
"features": {
"stream": false,
"tools": false,
"code": false,
"vision": false,
"mcp": false
},
"input_media": {
"text": true,
"image": false,
"audio": false,
"video": false,
"pdf": false
},
"output_media": {
"text": true,
"audio": false,
"video": false,
"image": false
},
"max_input_tokens": 123,
"max_output_tokens": 123,
"extended_context": true,
"picture_url": "<string>"
}
'import requests
url = "https://hiimpria.ai/api/admin/aimodel/{id}"
payload = {
"name": "<string>",
"institution": "<string>",
"description": "<string>",
"api_url": "<string>",
"api_key": "<string>",
"default_headers": {},
"features": {
"stream": False,
"tools": False,
"code": False,
"vision": False,
"mcp": False
},
"input_media": {
"text": True,
"image": False,
"audio": False,
"video": False,
"pdf": False
},
"output_media": {
"text": True,
"audio": False,
"video": False,
"image": False
},
"max_input_tokens": 123,
"max_output_tokens": 123,
"extended_context": True,
"picture_url": "<string>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
institution: '<string>',
description: '<string>',
api_url: '<string>',
api_key: '<string>',
default_headers: {},
features: {stream: false, tools: false, code: false, vision: false, mcp: false},
input_media: {text: true, image: false, audio: false, video: false, pdf: false},
output_media: {text: true, audio: false, video: false, image: false},
max_input_tokens: 123,
max_output_tokens: 123,
extended_context: true,
picture_url: '<string>'
})
};
fetch('https://hiimpria.ai/api/admin/aimodel/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hiimpria.ai/api/admin/aimodel/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'institution' => '<string>',
'description' => '<string>',
'api_url' => '<string>',
'api_key' => '<string>',
'default_headers' => [
],
'features' => [
'stream' => false,
'tools' => false,
'code' => false,
'vision' => false,
'mcp' => false
],
'input_media' => [
'text' => true,
'image' => false,
'audio' => false,
'video' => false,
'pdf' => false
],
'output_media' => [
'text' => true,
'audio' => false,
'video' => false,
'image' => false
],
'max_input_tokens' => 123,
'max_output_tokens' => 123,
'extended_context' => true,
'picture_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$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://hiimpria.ai/api/admin/aimodel/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"description\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<string>\",\n \"default_headers\": {},\n \"features\": {\n \"stream\": false,\n \"tools\": false,\n \"code\": false,\n \"vision\": false,\n \"mcp\": false\n },\n \"input_media\": {\n \"text\": true,\n \"image\": false,\n \"audio\": false,\n \"video\": false,\n \"pdf\": false\n },\n \"output_media\": {\n \"text\": true,\n \"audio\": false,\n \"video\": false,\n \"image\": false\n },\n \"max_input_tokens\": 123,\n \"max_output_tokens\": 123,\n \"extended_context\": true,\n \"picture_url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
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.put("https://hiimpria.ai/api/admin/aimodel/{id}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"description\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<string>\",\n \"default_headers\": {},\n \"features\": {\n \"stream\": false,\n \"tools\": false,\n \"code\": false,\n \"vision\": false,\n \"mcp\": false\n },\n \"input_media\": {\n \"text\": true,\n \"image\": false,\n \"audio\": false,\n \"video\": false,\n \"pdf\": false\n },\n \"output_media\": {\n \"text\": true,\n \"audio\": false,\n \"video\": false,\n \"image\": false\n },\n \"max_input_tokens\": 123,\n \"max_output_tokens\": 123,\n \"extended_context\": true,\n \"picture_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/admin/aimodel/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"description\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<string>\",\n \"default_headers\": {},\n \"features\": {\n \"stream\": false,\n \"tools\": false,\n \"code\": false,\n \"vision\": false,\n \"mcp\": false\n },\n \"input_media\": {\n \"text\": true,\n \"image\": false,\n \"audio\": false,\n \"video\": false,\n \"pdf\": false\n },\n \"output_media\": {\n \"text\": true,\n \"audio\": false,\n \"video\": false,\n \"image\": false\n },\n \"max_input_tokens\": 123,\n \"max_output_tokens\": 123,\n \"extended_context\": true,\n \"picture_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "User institution deleted successfully"
}Body
Partial update. Every field is optional; only the keys provided are written. The handler merges client_library / api_url / api_key with the stored document before re-validating, so you can update one field without resending the others.
conversationModel, conversationFallbackModel, imageGenerationModel, audioGenerationModel, videoGenerationModel, imageAnalysisModel, embeddingsModel, audioAnalysisModel, videoAnalysisModel, ttsModel, summaryModel, rtModel, moderationModel, kagAnalysisModel, kagAnalysisFallbackModel, threatDetectionModel, threatDetectionFallbackModel, meetingAddressingModel, meetingFusionModel, meetingConversationModel, meetingOrchestratorModel, meetingDeepThinkingModel, webIntentClassifierModel, webQueryRewriteModel, webContextSelectorModel, webRetrievalJudgeModel, webConversationFastModel, webConversationStandardModel, webConversationDeepModel, webSafetyGateModel, webMemoryWriteModel, webSummarizerModel, conductorModel, conductorFallbackModel, preflightModel, routerModel, plannerModel, designerModel, coderModel, testerModel, writerModel, agenticLoopModel, researcherModel, specWriterModel, planReviewerModel, judgeModel, securityReviewerModel, expertCoderUpgradeModel, mythicalPlannerModel, mythicalCoderModel, mythicalCoderVisualModel, mythicalJudgeModel, mythicalJudgeVisualModel Write-only provider API key (reads return hasApiKey, never the key).
- omitted,
""or the masked placeholder"••••••••"→ the stored key is KEPT; null→ the stored key is CLEARED ($unset);- any other string → written as the new key. Config validation runs against the effective key (the stored one when kept).
Was this page helpful?