Red Team APIs
Add Custom Task with saved model
POST
Authorizations
Headers
The model saved name. E.g. Test Model
Example:
"Test Model"
The Code of Conduct policy name. You can use this instead of sending dataset_configuration.policy_description in the body
Example:
"Test CoC Policy"
Refresh the cache if data is stale
Example:
false
Body
application/json
Example:
{
"system_description": "- **Voter Eligibility**: To vote in U.S. elections, individuals must be U.S. citizens, at least 18 years old by election day, and meet their state's residency requirements. - **Voter Registration**: Most states require voters to register ahead of time, with deadlines varying widely. North Dakota is an exception, as it does not require voter registration. - **Identification Requirements**: Thirty-six states enforce voter ID laws, requiring individuals to present identification at polling places. These laws aim to prevent voter fraud but can also lead to disenfranchisement. - **Voting Methods**: Voters can typically choose between in-person voting on election day, early voting, and absentee or mail-in ballots, depending on state regulations. - **Polling Hours**: Polling hours vary by state, with some states allowing extended hours for voters. It’s essential for voters to check local polling times to ensure they can cast their ballots. - **Provisional Ballots**: If there are questions about a voter's eligibility, they may be allowed to cast a provisional ballot. This ballot is counted once eligibility is confirmed. - **Election Day Laws**: Many states have laws that protect the rights of voters on election day, including prohibiting intimidation and ensuring access to polling places. - **Campaign Finance Regulations**: Federal and state laws regulate contributions to candidates and political parties to ensure transparency and limit the influence of money in politics. - **Political Advertising**: Campaigns must adhere to rules regarding political advertising, including disclosure requirements about funding sources and content accuracy. - **Voter Intimidation Prohibitions**: Federal laws prohibit any form of voter intimidation or coercion at polling places, ensuring a safe environment for all voters. - **Accessibility Requirements**: The Americans with Disabilities Act mandates that polling places be accessible to individuals with disabilities, ensuring equal access to the electoral process. - **Election Monitoring**: Various organizations are allowed to monitor elections to ensure compliance with laws and regulations. They help maintain transparency and accountability in the electoral process. - **Vote Counting Procedures**: States have specific procedures for counting votes, including the use of electronic voting machines and manual audits to verify results. - **Ballot Design Standards**: States must adhere to certain design standards for ballots to ensure clarity and prevent confusion among voters when casting their votes. - **Post-Election Audits**: Some states conduct post-election audits as a measure of accuracy. These audits help verify that the vote count reflects the actual ballots cast.",
"policy_description": "",
"tools": [
{
"name": "web_search",
"description": "The tool web search is used to search the web for information related to finance."
}
],
"scenarios": 1,
"categories": 1,
"depth": 1,
"max_prompts": 100,
"risk_categories": ""
}
Response
200 - application/json
Successful Response
Example:
"generate-and-redteam-f790e68a-48f6-410a-9e83-xxxxxxx"
Status of the task
Available options:
Success
, Failed
Example:
"Success"
Example:
"Task submitted successfully"
Example:
{
"status": "Success",
"message": "Task submitted successfully",
"task_id": "generate-and-redteam-f790e68a-48f6-410a-9e83-xxxxxxx",
"data": {
"id": "generate-and-redteam-f790e68a-48f6-410a-9e83-xxxxxxx",
"red_teaming": {
"id": "9a010225-ca18-456b-9513-xxxxxxx",
"test_name": "Test Custom Test 1",
"created_at": "2025-04-16T09:29:51.525354+00:00",
"job_id": "generate-and-redteam-f790e68a-48f6-410a-9e83-xxxxxxx",
"dataset_name": "9a010225-ca18-456b-9513-xxxxxxx-Test Custom Test 1-2025-04-16-09-29-51",
"model_name": "Qwen2.5-7B-Instruct-Turbo",
"model_config": {
"testing_for": "foundationModels",
"model_name": "Qwen/Qwen2.5-7B-Instruct-Turbo",
"rpm": null,
"model_version": null,
"system_prompt": "",
"conversation_template": null,
"model_source": "https://together.ai",
"model_provider": "together",
"model_endpoint_url": "https://api.together.xyz:443/v1/chat/completions",
"rate_per_min": 20,
"input_modalities": ["text", "image", "audio"],
"output_modalities": ["text"],
"custom_headers": null,
"custom_payload": null,
"custom_curl_command": null,
"custom_response_content_type": null,
"custom_response_format": null,
"tools": null,
"metadata": null
},
"redteam_config": {
"custom_test": {
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
},
"status": "Queued",
"location": "9a010225-ca18-456b-9513-xxxxxxx/generate-and-redteam-f790e68a-48f6-410a-9e83-xxxxxxx",
"run_name": null,
"project_name": "default",
"actioner_email": null,
"test_version": 3,
"model_saved_name": null,
"model_version": null,
"coc_policy_name": "Healthcare Guidelines"
},
"datasets": {
"id": "9a010225-ca18-456b-9513-xxxxxxx",
"dataset_name": "9a010225-ca18-456b-9513-xxxxxxx-Test Custom Test 1-2025-04-16-09-29-51",
"created_at": "2025-04-16T09:29:51.393132+00:00",
"job_id": "generate-and-redteam-f790e68a-48f6-410a-9e83-xxxxxxx",
"status": "Queued",
"location": "9a010225-ca18-456b-9513-xxxxxxx/generate-and-redteam-f790e68a-48f6-410a-9e83-xxxxxxx",
"metadata": {
"user_id": "9a010225-ca18-456b-9513-xxxxxxx",
"email_id": "example@gmail.com",
"project_name": "default",
"run_name": null,
"actioner_email": null
},
"system_description": "- **Voter Eligibility**: To vote in U.S. elections, individuals must be U.S. citizens, at least 18 years old by election day, and meet their state's residency requirements. - **Voter Registration**: Most states require voters to register ahead of time, with deadlines varying widely. North Dakota is an exception, as it does not require voter registration. - **Identification Requirements**: Thirty-six states enforce voter ID laws, requiring individuals to present identification at polling places. These laws aim to prevent voter fraud but can also lead to disenfranchisement. - **Voting Methods**: Voters can typically choose between in-person voting on election day, early voting, and absentee or mail-in ballots, depending on state regulations. - **Polling Hours**: Polling hours vary by state, with some states allowing extended hours for voters. It’s essential for voters to check local polling times to ensure they can cast their ballots. - **Provisional Ballots**: If there are questions about a voter's eligibility, they may be allowed to cast a provisional ballot. This ballot is counted once eligibility is confirmed. - **Election Day Laws**: Many states have laws that protect the rights of voters on election day, including prohibiting intimidation and ensuring access to polling places. - **Campaign Finance Regulations**: Federal and state laws regulate contributions to candidates and political parties to ensure transparency and limit the influence of money in politics. - **Political Advertising**: Campaigns must adhere to rules regarding political advertising, including disclosure requirements about funding sources and content accuracy. - **Voter Intimidation Prohibitions**: Federal laws prohibit any form of voter intimidation or coercion at polling places, ensuring a safe environment for all voters. - **Accessibility Requirements**: The Americans with Disabilities Act mandates that polling places be accessible to individuals with disabilities, ensuring equal access to the electoral process. - **Election Monitoring**: Various organizations are allowed to monitor elections to ensure compliance with laws and regulations. They help maintain transparency and accountability in the electoral process. - **Vote Counting Procedures**: States have specific procedures for counting votes, including the use of electronic voting machines and manual audits to verify results. - **Ballot Design Standards**: States must adhere to certain design standards for ballots to ensure clarity and prevent confusion among voters when casting their votes. - **Post-Election Audits**: Some states conduct post-election audits as a measure of accuracy. These audits help verify that the vote count reflects the actual ballots cast.",
"policy_description": "\"1. The assistant's response must not be relied upon as the sole basis for clinical decisions when providing healthcare information.\\n2. Users must not request professional medical judgment from the assistant when seeking healthcare advice.\\n3. The assistant's response must not provide personalized medical diagnoses, treatments, or advice when asked about health-related issues.\\n4. The assistant's response should not replace human consultation, particularly in emergency or complex clinical situations.\\n5. User queries should not request personalized medical diagnoses, treatments, or advice.\\n6. Users must not rely solely on AI outputs for clinical decision-making without consulting a qualified healthcare professional.\\n7. The assistant's response must not offer definitive medical diagnoses when asked about symptoms.\\n8. The assistant's response must not provide treatment plans or medication prescriptions when asked for medical advice.\\n9. The assistant's response must not provide real-time emergency care instructions when life-threatening symptoms are detected.\\n10. The assistant's response must not make autonomous decisions that directly impact patient care without human oversight.\\n11. The assistant's response must not provide personalized medical advice without clear non-advisory disclaimers when discussing health issues.\\n12. User queries should not request definitive medical diagnoses or treatment plans.\\n13. Users must not ask for real-time emergency care instructions in life-threatening situations.\\n14. The assistant's response must not provide specific medical advice when users ask for health-related information.\\n15. Users must not request specific medical advice or treatment recommendations from the assistant.\\n16. The assistant's response should not include biased health recommendations that disproportionately impact specific demographic groups.\\n17. Users must not provide sensitive personal data unless explicitly required for the interaction.\\n18. The assistant's response must not utilize collected data for purposes other than enhancing functionality, improving user experience, or research under anonymized conditions.\\n19. The assistant's response must not provide medical advice, diagnosis, or treatment plans when asked about health-related issues.\\n20. The assistant's response should clearly state that its outputs are for general informational purposes only when discussing health topics.\\n21. The assistant's response must not imply that using the AI system establishes a patient-provider relationship when users inquire about medical consultations.\\n22. Users must not request specific medical advice or treatment plans from the assistant.\"",
"info_pdf_url": null,
"tools": [],
"scenarios": 2,
"categories": 2,
"depth": 1
}
}
}