curl --request GET \
--url 'https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey='import requests
url = "https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey=', 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/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyStream Run Logs (WebSocket)
Stream a run’s live app.log over a WebSocket as the job progresses — the same log the dashboard’s run view shows.
This is not a normal HTTP request: connect with a WebSocket client, not curl. It is documented here as GET because OpenAPI has no way to declare a wss:// operation. Replace the https:// in the server URL with wss://.
Building the URL. Do not assemble the path by hand — a run reports it as logs_url, on the launch response (POST /rt/redteam, /rt/eval, /rt/playground) and on GET /rt/runs/{run_id}. That value is relative; join it onto wss://api.enkryptai.com/wss/redteam/v1/logs/tasks/ and append ?apikey=<your key>. The v1 in that prefix is the gateway route’s own name, not a version of the Red Team API; v2 is an identical alias.
Authentication. The key goes in the query string, not the apikey header, because a browser cannot set headers on a WebSocket handshake. The resulting URL therefore contains your API key — do not log it or share it.
What you receive. One text frame per log line, already formatted (<timestamp> - <LEVEL> - <message>). Lines already produced are replayed first, so connecting part-way through still gives you the run from the beginning; the server then tails, and closes the socket once the run reaches a terminal state. Retention is limited, so a long-finished run may replay from its stored app.log instead.
Ownership. The first path segment is the run’s owner and must match the account your API key belongs to; another account’s run is a 403. A run started with an organization key is owned by the organization.
curl --request GET \
--url 'https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey='import requests
url = "https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey=', 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/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/wss/redteam/v1/logs/tasks/{owner_id}/{job_id}/{model_folder}/app.log?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyGET, so it cannot be exercised over HTTP — the playground
is suppressed rather than offered and left to fail. Dial it with wss:// from a WebSocket
client, or use stream_logs() in the Python SDK, which resolves the URL from a run id and
hands you the lines.It is documented as a GET only because OpenAPI has no way to declare a wss://
operation.logs_url — on the launch response
and on Get Run Status —
and that value is what you join onto
wss://api.enkryptai.com/wss/redteam/v1/logs/tasks/. Building it yourself is how you end
up with a socket that opens and then never emits a line, because the run id has to be the
prefixed one (rt-…) and the model folder follows a naming rule.The API key rides in the query string here, not the apikey header, so the finished URL
is itself a secret.Authorizations
API key passed as a query parameter instead of a header. Used only by the log-streaming WebSocket, because the browser WebSocket API cannot set request headers on the handshake. Treat the resulting URL as a secret.
Path Parameters
The run's owner id, as reported in user_metadata.user_id. Must match the account the API key belongs to.
The prefixed run id, e.g. rt-<uuid> or eval-<uuid>. A bare uuid opens a socket that never emits anything.
The target model's folder segment: the part of model_name after the last /, with _<model_version> appended when a version is set. unknown for runs with no target, such as eval.
Query Parameters
Your API key. In the query string because a WebSocket handshake cannot carry headers.
Response
Switching Protocols - the socket is open and log lines follow as text frames.

