curl --request POST \
--url https://api.enkryptai.com/rt/redteam/jailbreak \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"target": {
"endpoint": "https://api.openai.com/v1",
"provider": "openai_compatible",
"api_key": "YOUR_TARGET_API_KEY",
"model_name": "gpt-4o-mini",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
]
}
}
'import requests
url = "https://api.enkryptai.com/rt/redteam/jailbreak"
payload = { "target": {
"endpoint": "https://api.openai.com/v1",
"provider": "openai_compatible",
"api_key": "YOUR_TARGET_API_KEY",
"model_name": "gpt-4o-mini",
"input_modalities": ["text"],
"output_modalities": ["text"]
} }
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: {
endpoint: 'https://api.openai.com/v1',
provider: 'openai_compatible',
api_key: 'YOUR_TARGET_API_KEY',
model_name: 'gpt-4o-mini',
input_modalities: ['text'],
output_modalities: ['text']
}
})
};
fetch('https://api.enkryptai.com/rt/redteam/jailbreak', 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://api.enkryptai.com/rt/redteam/jailbreak",
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([
'target' => [
'endpoint' => 'https://api.openai.com/v1',
'provider' => 'openai_compatible',
'api_key' => 'YOUR_TARGET_API_KEY',
'model_name' => 'gpt-4o-mini',
'input_modalities' => [
'text'
],
'output_modalities' => [
'text'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <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://api.enkryptai.com/rt/redteam/jailbreak"
payload := strings.NewReader("{\n \"target\": {\n \"endpoint\": \"https://api.openai.com/v1\",\n \"provider\": \"openai_compatible\",\n \"api_key\": \"YOUR_TARGET_API_KEY\",\n \"model_name\": \"gpt-4o-mini\",\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\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/rt/redteam/jailbreak")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"target\": {\n \"endpoint\": \"https://api.openai.com/v1\",\n \"provider\": \"openai_compatible\",\n \"api_key\": \"YOUR_TARGET_API_KEY\",\n \"model_name\": \"gpt-4o-mini\",\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/rt/redteam/jailbreak")
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\": {\n \"endpoint\": \"https://api.openai.com/v1\",\n \"provider\": \"openai_compatible\",\n \"api_key\": \"YOUR_TARGET_API_KEY\",\n \"model_name\": \"gpt-4o-mini\",\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Run Jailbreak Benchmark
Run Enkrypt AI’s fixed jailbreak benchmark against a target, as an ordinary Red Team run.
The recipe is fixed server-side: a 60-prompt jailbreak corpus (jailbreak_bench) attacked with a set mix of methods chosen from the target’s modalities. The dataset, the attack parameters and the evaluation are not caller-configurable, so the body takes only target, run_name and user_metadata - sending risk_categories, compliance_frameworks, attack_config, generation_config, context or any other key returns 422.
| Target modalities | Attacks run |
|---|---|
| text in, text out | 10 encoding transforms - upside_down, atbash, base32, caesar, pig_latin, zalgo, code_switching, base64, zero_width, homoglyph, each applied once per prompt (600 encoding attempts) - plus ARTA (rt_agent_v2) and GOAT (goat) |
| text + image in, text out | everything above, plus HADES-AT (hades_at) and CAMO (camo) |
Any other combination of target.input_modalities / target.output_modalities is rejected with 422.
There is no context field, so a Code of Conduct policy cannot be passed in the body; name it in the X-Enkrypt-Policy header instead. You do not send a user id either - the gateway identifies the run owner from your API key.
As on POST /rt/redteam, the target is health-checked before the run is queued (400 if it does not answer), and a submission your remaining Red Team credits cannot cover returns 402. The price is flat per modality class - see Credits and Usage.
Everything after submission is the ordinary Red Team v2 flow: a 202 carrying a run_id (prefixed rt-), then GET /rt/runs/{run_id}, .../results, .../records and .../stream, and POST /rt/runs/{run_id}/resume, as for any run.
curl --request POST \
--url https://api.enkryptai.com/rt/redteam/jailbreak \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"target": {
"endpoint": "https://api.openai.com/v1",
"provider": "openai_compatible",
"api_key": "YOUR_TARGET_API_KEY",
"model_name": "gpt-4o-mini",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
]
}
}
'import requests
url = "https://api.enkryptai.com/rt/redteam/jailbreak"
payload = { "target": {
"endpoint": "https://api.openai.com/v1",
"provider": "openai_compatible",
"api_key": "YOUR_TARGET_API_KEY",
"model_name": "gpt-4o-mini",
"input_modalities": ["text"],
"output_modalities": ["text"]
} }
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: {
endpoint: 'https://api.openai.com/v1',
provider: 'openai_compatible',
api_key: 'YOUR_TARGET_API_KEY',
model_name: 'gpt-4o-mini',
input_modalities: ['text'],
output_modalities: ['text']
}
})
};
fetch('https://api.enkryptai.com/rt/redteam/jailbreak', 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://api.enkryptai.com/rt/redteam/jailbreak",
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([
'target' => [
'endpoint' => 'https://api.openai.com/v1',
'provider' => 'openai_compatible',
'api_key' => 'YOUR_TARGET_API_KEY',
'model_name' => 'gpt-4o-mini',
'input_modalities' => [
'text'
],
'output_modalities' => [
'text'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <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://api.enkryptai.com/rt/redteam/jailbreak"
payload := strings.NewReader("{\n \"target\": {\n \"endpoint\": \"https://api.openai.com/v1\",\n \"provider\": \"openai_compatible\",\n \"api_key\": \"YOUR_TARGET_API_KEY\",\n \"model_name\": \"gpt-4o-mini\",\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\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/rt/redteam/jailbreak")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"target\": {\n \"endpoint\": \"https://api.openai.com/v1\",\n \"provider\": \"openai_compatible\",\n \"api_key\": \"YOUR_TARGET_API_KEY\",\n \"model_name\": \"gpt-4o-mini\",\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/rt/redteam/jailbreak")
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\": {\n \"endpoint\": \"https://api.openai.com/v1\",\n \"provider\": \"openai_compatible\",\n \"api_key\": \"YOUR_TARGET_API_KEY\",\n \"model_name\": \"gpt-4o-mini\",\n \"input_modalities\": [\n \"text\"\n ],\n \"output_modalities\": [\n \"text\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Headers
Optional. The name of a saved Code of Conduct policy to label the run with. There is deliberately no body field for this - the request model rejects unknown keys. The benchmark's prompts and scoring are fixed, so the policy does not change what is tested.
"customer-support-coc"
Body
POST /v1/redteam/jailbreak payload.
Fixed recipe: the jailbreak corpus, the attacks and the evaluation are server-owned, so target is the only thing to configure. The target must be text in and text out, or text + image in and text out.
Response
Successful Response
The accepted run. run_id is the value to carry into the run endpoints (GET /rt/runs/{run_id}, /records, /results, /stream).
Do not follow the *_url fields verbatim. They are relative and are not guaranteed to carry the /rt/ prefix this API is published under, so requesting one as given can return 400. Build the URL from run_id and the paths documented here instead - /rt/runs/{run_id}/records is the resource you want. The same applies to records_url on the results payload.
websocket_url is the Server-Sent Events progress stream (/rt/runs/{run_id}/stream) despite its name. The live log socket is logs_url - a relative path to join onto wss://api.enkryptai.com/wss/redteam/v1/logs/tasks/. See the Stream Run Logs (WebSocket) endpoint.

