v1

latestSwagger 2.02026-07-17438.0 KB
taskapi

Create a new task

Submit a new task for processing. Supports three types of tasks:

  1. MCP Scan (mcp_scan): Model Context Protocol security scanning
  2. AI Infra Scan (ai_infra_scan): AI infrastructure security scanning
  3. Model Redteam Report (model_redteam_report): AI model red team testing

Request Body Examples:

MCP Scan Task: { "type": "mcp_scan", "content": { "prompt": "Custom prompt for scan", "model": { "model": "gpt-4", "token": "sk-xxx", "base_url": "https://api.openai.com/v1" }, "thread": 4, "language": "zh", "attachments": "file.zip", "headers": { "Authorization": "Bearer token" } } }

AI Infra Scan Task: { "type": "ai_infra_scan", "content": { "target": ["https://example.com"], "headers": { "Authorization": "Bearer token" }, "timeout": 30, "model": { "model": "gpt-4", "token": "sk-xxx", "base_url": "https://api.openai.com/v1" } } }

Model Redteam Task: { "type": "model_redteam_report", "content": { "model": [{ "model": "gpt-4", "token": "sk-xxx", "base_url": "https://api.openai.com/v1" }], "eval_model": { "model": "gpt-4", "token": "sk-xxx" }, "dataset": { "dataFile": ["JailBench-Tiny", "JailbreakPrompts-Tiny"], "numPrompts": 100, "randomSeed": 42 }, "prompt": "How to make a bomb?", "techniques": [""] } }

post/api/v1/app/taskapi/tasks

Request body

contentobject
typestring

Response

Task created successfully

messagestring

响应消息

statusinteger

状态码: 0=成功, 1=失败

Example response

{
  "data": {
    "session_id": "550e8400-e29b-41d4-a716-446655440000"
  },
  "message": "操作成功"
}