Base URL
All API requests are made to:API Documentation
Complete API documentation, including interactive endpoint testing, is available at: https://api.circuitbreakerlabs.ai/v1/docsAction to Endpoint Mapping
Each GitHub Action in this repository corresponds to a specific API endpoint:Single-Turn System Prompt Evaluation
Action:circuitbreakerlabs/actions/singleturn-evaluate-system-prompt
Endpoint: POST /singleturn_evaluate_system_prompt
API Documentation: View endpoint
Evaluates a system prompt using single-turn adversarial testing against various attack vectors.
Request Parameters:
threshold(float): Score threshold where an individual test case is considered failedvariations(int): Number of test variations to generatemaximum_iteration_layers(int): Maximum depth of iterative attack refinementsystem_prompt(string): The system prompt text to evaluateopenrouter_model_name(string): Model to test via OpenRoutertest_case_groups(array, optional): Specific test case categories to run
cbl-api-key: Your Circuit Breaker Labs API keyContent-Type:application/json
Single-Turn OpenAI Fine-Tune Evaluation
Action:circuitbreakerlabs/actions/singleturn-evaluate-openai-finetune
Endpoint: POST /singleturn_evaluate_openai_finetune
API Documentation: View endpoint
Evaluates an OpenAI fine-tuned model using single-turn adversarial testing.
Request Parameters:
threshold(float): Score threshold where an individual test case is considered failedvariations(int): Number of test variations to generatemaximum_iteration_layers(int): Maximum depth of iterative attack refinementmodel_name(string): Fully qualified OpenAI fine-tuned model name (e.g.,ft:gpt-4o-mini-2024-07-18:org:model:id)openai_api_key(string): Your OpenAI API key for accessing the fine-tuned modeltest_case_groups(array, optional): Specific test case categories to run
cbl-api-key: Your Circuit Breaker Labs API keyContent-Type:application/json
Multi-Turn System Prompt Evaluation
Action:circuitbreakerlabs/actions/multiturn-evaluate-system-prompt
Endpoint: POST /multiturn_evaluate_system_prompt
API Documentation: View endpoint
Evaluates a system prompt using multi-turn conversational attacks that attempt to manipulate the model over multiple interactions.
Request Parameters:
threshold(float): Score threshold where an individual test case is considered failedmax_turns(int): Maximum conversation length in turns (must be even)test_types(array): Types of multi-turn attacks to executesystem_prompt(string): The system prompt text to evaluateopenrouter_model_name(string): Model to test via OpenRoutertest_case_groups(array, optional): Specific test case categories to run
cbl-api-key: Your Circuit Breaker Labs API keyContent-Type:application/json
Multi-Turn OpenAI Fine-Tune Evaluation
Action:circuitbreakerlabs/actions/multiturn-evaluate-openai-finetune
Endpoint: POST /multiturn_evaluate_openai_finetune
API Documentation: View endpoint
Evaluates an OpenAI fine-tuned model using multi-turn conversational attacks.
Request Parameters:
threshold(float): Score threshold where an individual test case is considered failedmax_turns(int): Maximum conversation length in turns (must be even)test_types(array): Types of multi-turn attacks to executemodel_name(string): Fully qualified OpenAI fine-tuned model nameopenai_api_key(string): Your OpenAI API key for accessing the fine-tuned modeltest_case_groups(array, optional): Specific test case categories to run
cbl-api-key: Your Circuit Breaker Labs API keyContent-Type:application/json
Example: Direct API Call
Here’s how thesingleturn-evaluate-system-prompt action translates to a direct API request:
GitHub Action:
The action’s
fail-action-threshold parameter is not sent to the API—it’s used locally to determine whether the workflow should fail based on the overall failure rate returned by the API.Response Format
All evaluation endpoints return a response containing:total_passed(int): Number of test cases that passedtotal_failed(int): Number of test cases that failedfailed_results(array): Detailed information about each failed test case
Authentication
All API requests require a Circuit Breaker Labs API key passed via thecbl-api-key header.