Skip to content
POST/api/v1/playground/jailbreak/attempt

Submit a jailbreak attempt (gamified)

Public jailbreak-playground endpoint — a visitor tries to extract a published level's hidden secret. Body: `{ levelSlug, visitorHandle (3-40 chars, alphanumeric/_/-), prompt (1-4000 chars) }`. Only platform levels (`status='published'` and no owning org) are reachable, so a customer's private level and secret can never be probed here. Three caps apply: a global 2000 attempts/hour backstop, 50/hour per hashed source IP, and the level's own `max_attempts_per_visitor` per handle — each 429s with its own code. The target call currently supports OpenAI only (502 TARGET_ERROR otherwise); every attempt is persisted to `jailbreak_attempts` with its verdict, and the secret is never echoed back. Returns `{ attemptId, verdict, reason, response, latencyMs }`. Authentication: none. This is a public endpoint and no credential is read. The empty `security` is a deliberate statement rather than an omission — nothing on this path resolves a caller, so no API-key scope is evaluated and an `eg_` key sent anyway is ignored.

Authentication

Public endpoint. No credential is read — send the request without an Authorization header. This is a deliberate statement, not a missing one.

Request body required

Example

{
  "level": "string",
  "prompt": "string"
}
Schema
{
  "application/json": {
    "schema": {
      "type": "object",
      "required": [
        "level",
        "prompt"
      ],
      "properties": {
        "level": {
          "type": "string"
        },
        "prompt": {
          "type": "string"
        }
      }
    }
  }
}

Response

200 example

{
  "success": true
}

All status codes

200Attempt result.
400(no description)
401(no description)
404Not Found — LEVEL_NOT_FOUND.
409Conflict — CONFLICT.
429(no description)
500Internal Server Error — DB_ERROR.
502Bad Gateway — TARGET_ERROR.

Code samples

cURL

curl -X POST \
  https://evalguard.ai/api/v1/playground/jailbreak/attempt \
  -H "Authorization: Bearer $EVALGUARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "level": "string", "prompt": "string" }'

TypeScript

// The TypeScript SDK (@evalguard/sdk) exposes TYPED methods — runEval,
// getEval, runSecurityScan, checkFirewall, … — not a generic request().
// For an arbitrary endpoint, call it directly:

const res = await fetch("https://evalguard.ai/api/v1/playground/jailbreak/attempt", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.EVALGUARD_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "level": "string",
    "prompt": "string"
  }),
});
console.log(res.status, await res.json());

Python

# The Python SDK (pip install evalguardai) exposes TYPED methods on
# EvalGuardClient — run_eval, get_eval, … — not a generic request().
# For an arbitrary endpoint, call it directly:

import os
import requests

headers = {"Authorization": f"Bearer {os.environ['EVALGUARD_API_KEY']}"}
headers["Content-Type"] = "application/json"

response = requests.request(
    "POST",
    "https://evalguard.ai/api/v1/playground/jailbreak/attempt",
    headers=headers,
    json={
    "level": "string",
    "prompt": "string"
},
)
print(response.status_code, response.json())

Go

package main

import (
	"context"
	"fmt"
	"net/http"
	"os"
	"strings"
)

func main() {
	body := strings.NewReader(`{"level":"string","prompt":"string"}`)
	req, _ := http.NewRequestWithContext(context.Background(), "POST", "https://evalguard.ai/api/v1/playground/jailbreak/attempt", body)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	resp, err := http.DefaultClient.Do(req)
	if err != nil { panic(err) }
	defer resp.Body.Close()
	fmt.Println(resp.Status)
}

Errors

400401404409429500502

Other Playground endpoints