Skip to main content
Stream Run Logs (WebSocket)
There is no Try-it control on this page, on purpose. This address is a WebSocket upgrade, not a request/response GET, 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.
Do not assemble this path by hand. A run reports it as 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.
For the walkthrough — starting a run, following its logs, and reading the results — see step 5 of Red Teaming Through the Relay Bridge.

Authorizations

apikey
string
query
required

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

owner_id
string
required

The run's owner id, as reported in user_metadata.user_id. Must match the account the API key belongs to.

job_id
string
required

The prefixed run id, e.g. rt-<uuid> or eval-<uuid>. A bare uuid opens a socket that never emits anything.

model_folder
string
required

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

apikey
string
required

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.