package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/redteam/model-health"
payload := strings.NewReader("{\n \"target_model_configuration\": {\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"testing_for\": \"Copilot\",\n \"model_version\": \"v1\",\n \"model_source\": \"https://together.ai\",\n \"model_provider\": \"together\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_api_key\": \"ABCDE12345678900\",\n \"system_prompt\": \"\",\n \"rate_per_min\": 20,\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\n ],\n \"tools\": [\n {\n \"name\": \"web_search\",\n \"description\": \"The tool web search is used to search the web for information related to finance.\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<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://api.enkryptai.com/redteam/model-health")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"target_model_configuration\": {\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"testing_for\": \"Copilot\",\n \"model_version\": \"v1\",\n \"model_source\": \"https://together.ai\",\n \"model_provider\": \"together\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_api_key\": \"ABCDE12345678900\",\n \"system_prompt\": \"\",\n \"rate_per_min\": 20,\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\n ],\n \"tools\": [\n {\n \"name\": \"web_search\",\n \"description\": \"The tool web search is used to search the web for information related to finance.\"\n }\n ]\n }\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/redteam/model-health")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"target_model_configuration\": {\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"testing_for\": \"Copilot\",\n \"model_version\": \"v1\",\n \"model_source\": \"https://together.ai\",\n \"model_provider\": \"together\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_api_key\": \"ABCDE12345678900\",\n \"system_prompt\": \"\",\n \"rate_per_min\": 20,\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\n ],\n \"tools\": [\n {\n \"name\": \"web_search\",\n \"description\": \"The tool web search is used to search the web for information related to finance.\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body
{ "status": "healthy", "message": "Model health check completed successfully", "data": { "query": "What is the capital of India?", "response": "The capital of India is New Delhi." }, "error": "Error while checking model health"}
Red Team (Legacy)
Model Health
POST
/
redteam
/
model-health
Model Health
curl --request POST \ --url https://api.enkryptai.com/redteam/model-health \ --header 'Content-Type: application/json' \ --header 'apikey: <api-key>' \ --data '{ "target_model_configuration": { "model_name": "mistralai/Mistral-7B-Instruct-v0.1", "testing_for": "Copilot", "model_version": "v1", "model_source": "https://together.ai", "model_provider": "together", "model_endpoint_url": "https://api.together.xyz/v1/chat/completions", "model_api_key": "ABCDE12345678900", "system_prompt": "", "rate_per_min": 20, "input_modalities": [ "text" ], "output_modalities": [ "text" ], "tools": [ { "name": "web_search", "description": "The tool web search is used to search the web for information related to finance." } ] }}'
import requests
url = "https://api.enkryptai.com/redteam/model-health"
payload = { "target_model_configuration": {
"model_name": "mistralai/Mistral-7B-Instruct-v0.1",
"testing_for": "Copilot",
"model_version": "v1",
"model_source": "https://together.ai",
"model_provider": "together",
"model_endpoint_url": "https://api.together.xyz/v1/chat/completions",
"model_api_key": "ABCDE12345678900",
"system_prompt": "",
"rate_per_min": 20,
"input_modalities": ["text"],
"output_modalities": ["text"],
"tools": [
{
"name": "web_search",
"description": "The tool web search is used to search the web for information related to finance."
}
]
} }
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
target_model_configuration: {
model_name: 'mistralai/Mistral-7B-Instruct-v0.1',
testing_for: 'Copilot',
model_version: 'v1',
model_source: 'https://together.ai',
model_provider: 'together',
model_endpoint_url: 'https://api.together.xyz/v1/chat/completions',
model_api_key: 'ABCDE12345678900',
system_prompt: '',
rate_per_min: 20,
input_modalities: ['text'],
output_modalities: ['text'],
tools: [
{
name: 'web_search',
description: 'The tool web search is used to search the web for information related to finance.'
}
]
}
})
};
fetch('https://api.enkryptai.com/redteam/model-health', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/redteam/model-health"
payload := strings.NewReader("{\n \"target_model_configuration\": {\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"testing_for\": \"Copilot\",\n \"model_version\": \"v1\",\n \"model_source\": \"https://together.ai\",\n \"model_provider\": \"together\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_api_key\": \"ABCDE12345678900\",\n \"system_prompt\": \"\",\n \"rate_per_min\": 20,\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\n ],\n \"tools\": [\n {\n \"name\": \"web_search\",\n \"description\": \"The tool web search is used to search the web for information related to finance.\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<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://api.enkryptai.com/redteam/model-health")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"target_model_configuration\": {\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"testing_for\": \"Copilot\",\n \"model_version\": \"v1\",\n \"model_source\": \"https://together.ai\",\n \"model_provider\": \"together\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_api_key\": \"ABCDE12345678900\",\n \"system_prompt\": \"\",\n \"rate_per_min\": 20,\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\n ],\n \"tools\": [\n {\n \"name\": \"web_search\",\n \"description\": \"The tool web search is used to search the web for information related to finance.\"\n }\n ]\n }\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/redteam/model-health")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"target_model_configuration\": {\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"testing_for\": \"Copilot\",\n \"model_version\": \"v1\",\n \"model_source\": \"https://together.ai\",\n \"model_provider\": \"together\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_api_key\": \"ABCDE12345678900\",\n \"system_prompt\": \"\",\n \"rate_per_min\": 20,\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\n ],\n \"tools\": [\n {\n \"name\": \"web_search\",\n \"description\": \"The tool web search is used to search the web for information related to finance.\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body
{ "status": "healthy", "message": "Model health check completed successfully", "data": { "query": "What is the capital of India?", "response": "The capital of India is New Delhi." }, "error": "Error while checking model health"}