API Documentation
...
Automated RedTeaming for GenAI
<POST> RedTeaming Analysis
2 min
the below parameters are for automated redteaming analysis for genai to know more about the different test parameters, see automated redteaming for genai start analysis { "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 { "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 } payload parameters test task "chatbot" test level "lite", "basic", "intermediate", "advanced", "super adv" test sel parameters "toxicity", "nsfw", "generic harm", "jailbreak", "sid", "pii", "spii" 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