---
title: <POST> RedTeaming Analysis
slug: lesspostgreater-redteaming-analysis
docTags: 
createdAt: 2025-04-02T04:47:38.034Z
---

The below parameters are for automated redteaming analysis for GenAI. To know more about the different test parameters, see Automated RedTeaming for GenAI.



:::CodeblockTabs
Start-analysis

```json
 {
    "cloud_env": "azure",
    "model_backbone": "openai",
    "api_key": "<api-key-to-access-llm>",
    "api_endpoint_url": "https://<llm-end-point>.com/",
    "api_version": "<api-version-to-access-llm>",
    "api_endpoint_deployment_name": "<end-point-deployment-name>",
    "test_connection": false,
    "test_task": "chatbot",
    "test_level": "lite",
    "test_sel_parameters": ["toxicity", "jailbreak"]
}
```

Test-Connection

```json
 {
    "cloud_env": "azure",
    "model_backbone": "openai",
    "api_key": "<api-key-to-access-llm>",
    "api_endpoint_url": "https://<llm-end-point>.com/",
    "api_version": "<api-version-to-access-llm>",
    "api_endpoint_deployment_name": "<end-point-deployment-name>",
    "test_connection": True
}
```
:::

:::ExpandableHeading
### Payload parameters

- **test\_task:&#x20;**"chatbot"&#x20;
- **test\_level:&#x20;**"lite", "basic", "intermediate", "advanced", "super-adv"
- **test\_sel\_parameters:&#x20;**"toxicity", "nsfw", "generic-harm", "jailbreak", "sid", "pii", "spii"&#x20;
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://api.aws.boschaishield.com/prod/api/ais/v1.5/genairedteaming",
  "name": "Model anaylsis",
  "method": "POST",
  "request": {
    "pathParameters": [
      {
        "name": "content-type",
        "kind": "required",
        "type": "string",
        "description": "application/json",
        "": "application/json"
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "x-api-key",
        "type": "string",
        "children": [],
        "description": "Enter your API key"
      },
      {
        "kind": "required",
        "name": "Org-id",
        "type": "string",
        "children": [],
        "description": "Enter your organization id"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "DL4HDcclTH6dUtOu-opbD",
        "code": "// 200 OK: Returns a JSON object containing unique model ID and urls to upload required files.",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "z5dS_OPIMHsxFEwrtKnkw",
        "language": "401",
        "code": "// 401 Unauthorized: Returns an error message if the provided API key or Org-ID is invalid or expired.",
        "customLabel": ""
      },
      {
        "id": "xJHL9zR5wAZ30f4gu2BUz",
        "language": "400",
        "code": "// 400 Bad request Error: Returns an error message if the application cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, etc.)",
        "customLabel": ""
      },
      {
        "id": "eXy7xHvpQ-HT16gZp2CNA",
        "language": "412",
        "code": "// 412 precondition failed: Returns an error message if access to the target resource has been denied. (For example- if any of the parameter value is incorrect or license has expired)",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "eXy7xHvpQ-HT16gZp2CNA"
  },
  "examples": {
    "languages": [
      {
        "id": "_mGBjlMU9k01Z6CEkara5",
        "language": "python",
        "code": "import requests\n\nurl = \"https://api.aws.boschaishield.com/prod/api/ais/v1.5/genairedteaming\"\n\n# please select proper payload for your usecase for extraction, evasion or poisoning.\npayload={\n    # <<Enter Payload Data>>\n}\nheaders = {\n   'Accept': 'application/json',\n   'x-api-key': '########################################',\n   'Org-Id': '####################################################################################################'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)",
        "customLabel": ""
      },
      {
        "id": "EZTVIARgk4Cgsi2z3kaoP",
        "language": "curl",
        "code": "modelID=\"<< Enter Model ID >>\"\ncurl --location 'https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse/${modelID}' \\\n--header 'x-api-key: ########################################' \\\n--header 'Org-Id: ####################################################################################################' \\\n--header 'Content-Type: application/json' \\\n--data '{\n        <<Enter Payload Data>>\n}'",
        "customLabel": ""
      },
      {
        "id": "kc6RvtVQgBj0xpcZD7Nak",
        "language": "nodejs",
        "code": "var request = require('request');\n\nmodelID = '<<Enter Model ID >>'\nvar options = {\n  'method': 'POST',\n  'url': 'https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse/'+modelID+'',\n  'headers': {\n    'x-api-key': '########################################',\n    'org_id': '####################################################################################################',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n        // <<Enter Task Pair based Payload>>\n  })\n\n};\nrequest(options, function (error, response) {\n  if (error) throw new Error(error);\n  console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "Nx00RqrLXpofFTyDCguK0",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"x-api-key\", \"########################################\");\nmyHeaders.append(\"org_id\", \"####################################################################################################\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n    // << Enter Payload Details based on Task pair >>\n});\n\nvar modelID = \"<< Enter Model ID >>\"\n\nvar requestOptions = {\n  method: 'POST',\n  headers: myHeaders,\n  body: raw,\n  redirect: 'follow'\n};\n\nfetch(\"https://api.aws.boschaishield.com/prod/api/ais/v1.5/model_analyse/\"+modelID+\"\", requestOptions)\n  .then(response => response.text())\n  .then(result => console.log(result))\n  .catch(error => console.log('error', error));",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "_mGBjlMU9k01Z6CEkara5"
  },
  "description": "",
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  }
}
```
:::

