curl --request POST \
--url https://hiimpria.ai/api/admin/accounts/{accountId}/aimodels/{modelUse}/test \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"name": "<string>",
"client_library": "<string>",
"api_url": "<string>",
"api_key": "<string>"
}
'import requests
url = "https://hiimpria.ai/api/admin/accounts/{accountId}/aimodels/{modelUse}/test"
payload = {
"name": "<string>",
"client_library": "<string>",
"api_url": "<string>",
"api_key": "<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>',
client_library: '<string>',
api_url: '<string>',
api_key: '<string>'
})
};
fetch('https://hiimpria.ai/api/admin/accounts/{accountId}/aimodels/{modelUse}/test', 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/accounts/{accountId}/aimodels/{modelUse}/test",
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>',
'client_library' => '<string>',
'api_url' => '<string>',
'api_key' => '<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/accounts/{accountId}/aimodels/{modelUse}/test"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"client_library\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<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/accounts/{accountId}/aimodels/{modelUse}/test")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"client_library\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/admin/accounts/{accountId}/aimodels/{modelUse}/test")
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 \"client_library\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodySend one test request to the account's custom AI model of one model type
Tests the stored model, or the Client Library Type, name, endpoint and key sent in the body before they are saved. Nothing is stored. The stored key is only sent to the destination it was saved with: to test another endpoint or another Client Library Type, send the key too. The request depends on the model type, as described for the PUT. A test needs a model name, a key and an endpoint; an anthropic_cli model needs no endpoint. For anthropic_cli an api_url sent empty is tested as the empty endpoint. An anthropic_cli endpoint whose path ends in /v1 is refused, as for the PUT. A google_cli model needs no endpoint either (an api_url sent empty is tested as the empty endpoint), and a google_cli endpoint whose path ends in /v1, /v1beta or /v1alpha is refused. A bedrock_cli test needs a model name and the account’s AWS key pair, and refuses an api_url or api_key.
curl --request POST \
--url https://hiimpria.ai/api/admin/accounts/{accountId}/aimodels/{modelUse}/test \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"name": "<string>",
"client_library": "<string>",
"api_url": "<string>",
"api_key": "<string>"
}
'import requests
url = "https://hiimpria.ai/api/admin/accounts/{accountId}/aimodels/{modelUse}/test"
payload = {
"name": "<string>",
"client_library": "<string>",
"api_url": "<string>",
"api_key": "<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>',
client_library: '<string>',
api_url: '<string>',
api_key: '<string>'
})
};
fetch('https://hiimpria.ai/api/admin/accounts/{accountId}/aimodels/{modelUse}/test', 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/accounts/{accountId}/aimodels/{modelUse}/test",
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>',
'client_library' => '<string>',
'api_url' => '<string>',
'api_key' => '<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/accounts/{accountId}/aimodels/{modelUse}/test"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"client_library\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<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/accounts/{accountId}/aimodels/{modelUse}/test")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"client_library\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/admin/accounts/{accountId}/aimodels/{modelUse}/test")
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 \"client_library\": \"<string>\",\n \"api_url\": \"<string>\",\n \"api_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyPath Parameters
Body
Response
The endpoint answered, and the answer passed
Was this page helpful?