curl --request POST \
--url https://hiimpria.ai/api/admin/aimodel \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"name": "<string>",
"institution": "<string>",
"model_use": "conversationModel",
"description": "<string>",
"client_library": "openai_cli",
"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": 128000,
"max_output_tokens": 64000,
"extended_context": false,
"status": "active",
"picture_url": "<string>"
}
'import requests
url = "https://hiimpria.ai/api/admin/aimodel"
payload = {
"name": "<string>",
"institution": "<string>",
"model_use": "conversationModel",
"description": "<string>",
"client_library": "openai_cli",
"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": 128000,
"max_output_tokens": 64000,
"extended_context": False,
"status": "active",
"picture_url": "<string>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
institution: '<string>',
model_use: 'conversationModel',
description: '<string>',
client_library: 'openai_cli',
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: 128000,
max_output_tokens: 64000,
extended_context: false,
status: 'active',
picture_url: '<string>'
})
};
fetch('https://hiimpria.ai/api/admin/aimodel', 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",
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([
'name' => '<string>',
'institution' => '<string>',
'model_use' => 'conversationModel',
'description' => '<string>',
'client_library' => 'openai_cli',
'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' => 128000,
'max_output_tokens' => 64000,
'extended_context' => false,
'status' => 'active',
'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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"model_use\": \"conversationModel\",\n \"description\": \"<string>\",\n \"client_library\": \"openai_cli\",\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\": 128000,\n \"max_output_tokens\": 64000,\n \"extended_context\": false,\n \"status\": \"active\",\n \"picture_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://hiimpria.ai/api/admin/aimodel")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"model_use\": \"conversationModel\",\n \"description\": \"<string>\",\n \"client_library\": \"openai_cli\",\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\": 128000,\n \"max_output_tokens\": 64000,\n \"extended_context\": false,\n \"status\": \"active\",\n \"picture_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/admin/aimodel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"model_use\": \"conversationModel\",\n \"description\": \"<string>\",\n \"client_library\": \"openai_cli\",\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\": 128000,\n \"max_output_tokens\": 64000,\n \"extended_context\": false,\n \"status\": \"active\",\n \"picture_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"id": "<string>",
"message": "AIModel created!"
}Create a new AI model
Creates a new AI model configuration. The handler validates the client_library / api_url / api_key combination via validateAIModelConfig before saving — openai_cli requires both api_url and api_key; xai_cli requires api_key (an X.AI (Grok) model is only called with its own key, at its api_url or, without one, at xAI’s own address) and its api_url is the base address including /v1; mistral_cli requires api_key (a Mistral AI model is only called with its own key, at its api_url or, without one, at Mistral’s own address) and its api_url may not end in /v1 (the requests add /v1/… themselves); anthropic_cli requires api_key when an api_url is set (an endpoint is only called with the model’s own key), its api_url may not end in /v1 (the requests add /v1/messages themselves), and an anthropic_cli model with neither is created only on a Digital Twin that has an Anthropic key of its own (the model is then called with that key); google_cli requires api_key when an api_url is set, its api_url may not end in /v1, /v1beta or /v1alpha (the requests add /v1beta/models/… themselves), and a google_cli model with neither is created only on a Digital Twin that has a Gemini API key of its own (the model is then called with that key); bedrock_cli requires neither, and is created only when the Digital Twin or its account holds a complete AWS key pair (an access key id and a secret access key), with which it is called, the account’s first. When institution is omitted, the caller’s institution is used. Only a pair of model_use and client_library that works for a Digital Twin’s custom AI model is created, that is an OpenAI-compatible (openai_cli) Conversation, Image Generation, Video Generation, Image Analysis, Audio Transcription, Text To Speech, Document Summarization, Moderation, Knowledge Generation or Knowledge Generation Fallback model, or an AWS Bedrock (bedrock_cli) Conversation, Image Analysis, Document Summarization, Image Generation, Knowledge Generation or Knowledge Generation Fallback model, or an Anthropic (anthropic_cli) Conversation, Image Analysis, Document Summarization, Knowledge Generation or Knowledge Generation Fallback model, or a Google GenAI (google_cli) Conversation, Image Analysis, Video Analysis, Document Summarization, Image Generation, Knowledge Generation or Knowledge Generation Fallback model, or a Mistral AI (mistral_cli) Conversation, Image Analysis, Audio Transcription, Text To Speech, Document Summarization, Knowledge Generation or Knowledge Generation Fallback model, or an X.AI (Grok) (xai_cli) Conversation, Image Analysis, Text To Speech, Document Summarization, Image Generation, Knowledge Generation or Knowledge Generation Fallback model. Embeddings is not offered. A type or a library left out, null or empty is conversationModel / openai_cli, is stored as such, and api_url / api_key are validated for that library.
curl --request POST \
--url https://hiimpria.ai/api/admin/aimodel \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"name": "<string>",
"institution": "<string>",
"model_use": "conversationModel",
"description": "<string>",
"client_library": "openai_cli",
"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": 128000,
"max_output_tokens": 64000,
"extended_context": false,
"status": "active",
"picture_url": "<string>"
}
'import requests
url = "https://hiimpria.ai/api/admin/aimodel"
payload = {
"name": "<string>",
"institution": "<string>",
"model_use": "conversationModel",
"description": "<string>",
"client_library": "openai_cli",
"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": 128000,
"max_output_tokens": 64000,
"extended_context": False,
"status": "active",
"picture_url": "<string>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
institution: '<string>',
model_use: 'conversationModel',
description: '<string>',
client_library: 'openai_cli',
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: 128000,
max_output_tokens: 64000,
extended_context: false,
status: 'active',
picture_url: '<string>'
})
};
fetch('https://hiimpria.ai/api/admin/aimodel', 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",
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([
'name' => '<string>',
'institution' => '<string>',
'model_use' => 'conversationModel',
'description' => '<string>',
'client_library' => 'openai_cli',
'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' => 128000,
'max_output_tokens' => 64000,
'extended_context' => false,
'status' => 'active',
'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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"model_use\": \"conversationModel\",\n \"description\": \"<string>\",\n \"client_library\": \"openai_cli\",\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\": 128000,\n \"max_output_tokens\": 64000,\n \"extended_context\": false,\n \"status\": \"active\",\n \"picture_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://hiimpria.ai/api/admin/aimodel")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"model_use\": \"conversationModel\",\n \"description\": \"<string>\",\n \"client_library\": \"openai_cli\",\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\": 128000,\n \"max_output_tokens\": 64000,\n \"extended_context\": false,\n \"status\": \"active\",\n \"picture_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/admin/aimodel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"institution\": \"<string>\",\n \"model_use\": \"conversationModel\",\n \"description\": \"<string>\",\n \"client_library\": \"openai_cli\",\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\": 128000,\n \"max_output_tokens\": 64000,\n \"extended_context\": false,\n \"status\": \"active\",\n \"picture_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"id": "<string>",
"message": "AIModel created!"
}Body
The model type. The list is every value the schema stores; a new model is accepted only with a pair of model_use and client_library that works for a Digital Twin's custom AI model, the pairs the operation's description lists (a type with none, such as embeddingsModel, is refused).
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 Provider base URL. Required for openai_cli custom models; optional for anthropic_cli (with an API key and no URL, Anthropic's own address; a URL is a base address, without /v1); optional for google_cli (with an API key and no URL, Google's own address; a URL is a base address, without an API version (/v1, /v1beta, /v1alpha)); optional for mistral_cli (with no URL, Mistral's own address; a URL is a base address, without /v1); optional for xai_cli (with no URL, xAI's own address; a URL is a base address, including /v1).
Provider API key. Required for openai_cli, mistral_cli, and xai_cli custom models, for an anthropic_cli or google_cli custom model that has an api_url, for an anthropic_cli custom model on a Digital Twin without an Anthropic key of its own, and for a google_cli custom model on a Digital Twin without a Gemini API key of its own. Write-only — never echoed back; reads carry hasApiKey instead.
Was this page helpful?