curl --request POST \
--url https://api.cekura.ai/test_framework/v3/scenarios/generate/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"num_scenarios": 50,
"agent_id": 123,
"assistant_id": "<string>",
"personalities": [
123
],
"test_profile": 123,
"scenario_type": "workflow",
"expected_outcome": "<string>",
"extra_instructions": "<string>",
"generation_files": [
"<string>"
],
"inbound_phone_number": 123,
"first_message": "Hello",
"generate_expected_outcomes": false,
"tags": [
"<string>"
],
"tool_ids": [
"TOOL_DTMF",
"TOOL_END_CALL",
"TOOL_END_CALL_ONLY_ON_TRANSFER"
],
"folder_path": "<string>"
}
'import requests
url = "https://api.cekura.ai/test_framework/v3/scenarios/generate/"
payload = {
"num_scenarios": 50,
"agent_id": 123,
"assistant_id": "<string>",
"personalities": [123],
"test_profile": 123,
"scenario_type": "workflow",
"expected_outcome": "<string>",
"extra_instructions": "<string>",
"generation_files": ["<string>"],
"inbound_phone_number": 123,
"first_message": "Hello",
"generate_expected_outcomes": False,
"tags": ["<string>"],
"tool_ids": ["TOOL_DTMF", "TOOL_END_CALL", "TOOL_END_CALL_ONLY_ON_TRANSFER"],
"folder_path": "<string>"
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
num_scenarios: 50,
agent_id: 123,
assistant_id: '<string>',
personalities: [123],
test_profile: 123,
scenario_type: 'workflow',
expected_outcome: '<string>',
extra_instructions: '<string>',
generation_files: ['<string>'],
inbound_phone_number: 123,
first_message: 'Hello',
generate_expected_outcomes: false,
tags: ['<string>'],
tool_ids: ['TOOL_DTMF', 'TOOL_END_CALL', 'TOOL_END_CALL_ONLY_ON_TRANSFER'],
folder_path: '<string>'
})
};
fetch('https://api.cekura.ai/test_framework/v3/scenarios/generate/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cekura.ai/test_framework/v3/scenarios/generate/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'num_scenarios' => 50,
'agent_id' => 123,
'assistant_id' => '<string>',
'personalities' => [
123
],
'test_profile' => 123,
'scenario_type' => 'workflow',
'expected_outcome' => '<string>',
'extra_instructions' => '<string>',
'generation_files' => [
'<string>'
],
'inbound_phone_number' => 123,
'first_message' => 'Hello',
'generate_expected_outcomes' => false,
'tags' => [
'<string>'
],
'tool_ids' => [
'TOOL_DTMF',
'TOOL_END_CALL',
'TOOL_END_CALL_ONLY_ON_TRANSFER'
],
'folder_path' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CEKURA-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/test_framework/v3/scenarios/generate/"
payload := strings.NewReader("{\n \"num_scenarios\": 50,\n \"agent_id\": 123,\n \"assistant_id\": \"<string>\",\n \"personalities\": [\n 123\n ],\n \"test_profile\": 123,\n \"scenario_type\": \"workflow\",\n \"expected_outcome\": \"<string>\",\n \"extra_instructions\": \"<string>\",\n \"generation_files\": [\n \"<string>\"\n ],\n \"inbound_phone_number\": 123,\n \"first_message\": \"Hello\",\n \"generate_expected_outcomes\": false,\n \"tags\": [\n \"<string>\"\n ],\n \"tool_ids\": [\n \"TOOL_DTMF\",\n \"TOOL_END_CALL\",\n \"TOOL_END_CALL_ONLY_ON_TRANSFER\"\n ],\n \"folder_path\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cekura.ai/test_framework/v3/scenarios/generate/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"num_scenarios\": 50,\n \"agent_id\": 123,\n \"assistant_id\": \"<string>\",\n \"personalities\": [\n 123\n ],\n \"test_profile\": 123,\n \"scenario_type\": \"workflow\",\n \"expected_outcome\": \"<string>\",\n \"extra_instructions\": \"<string>\",\n \"generation_files\": [\n \"<string>\"\n ],\n \"inbound_phone_number\": 123,\n \"first_message\": \"Hello\",\n \"generate_expected_outcomes\": false,\n \"tags\": [\n \"<string>\"\n ],\n \"tool_ids\": [\n \"TOOL_DTMF\",\n \"TOOL_END_CALL\",\n \"TOOL_END_CALL_ONLY_ON_TRANSFER\"\n ],\n \"folder_path\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v3/scenarios/generate/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"num_scenarios\": 50,\n \"agent_id\": 123,\n \"assistant_id\": \"<string>\",\n \"personalities\": [\n 123\n ],\n \"test_profile\": 123,\n \"scenario_type\": \"workflow\",\n \"expected_outcome\": \"<string>\",\n \"extra_instructions\": \"<string>\",\n \"generation_files\": [\n \"<string>\"\n ],\n \"inbound_phone_number\": 123,\n \"first_message\": \"Hello\",\n \"generate_expected_outcomes\": false,\n \"tags\": [\n \"<string>\"\n ],\n \"tool_ids\": [\n \"TOOL_DTMF\",\n \"TOOL_END_CALL\",\n \"TOOL_END_CALL_ONLY_ON_TRANSFER\"\n ],\n \"folder_path\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "completed",
"agent_id": 123,
"total_scenarios": 123,
"completed_scenarios": 123,
"failed_scenarios": 123,
"scenarios_list": [
{}
],
"errors": [
"<unknown>"
],
"warnings": [
"<unknown>"
],
"session_id": 123,
"current_step": "<string>"
}{
"field_name": [
"<string>"
]
}Generate Evaluator V3
Generate evaluators for an agent and return them once generation finishes. Generation never pauses for clarification questions. Usually takes 1–4 minutes.
curl --request POST \
--url https://api.cekura.ai/test_framework/v3/scenarios/generate/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"num_scenarios": 50,
"agent_id": 123,
"assistant_id": "<string>",
"personalities": [
123
],
"test_profile": 123,
"scenario_type": "workflow",
"expected_outcome": "<string>",
"extra_instructions": "<string>",
"generation_files": [
"<string>"
],
"inbound_phone_number": 123,
"first_message": "Hello",
"generate_expected_outcomes": false,
"tags": [
"<string>"
],
"tool_ids": [
"TOOL_DTMF",
"TOOL_END_CALL",
"TOOL_END_CALL_ONLY_ON_TRANSFER"
],
"folder_path": "<string>"
}
'import requests
url = "https://api.cekura.ai/test_framework/v3/scenarios/generate/"
payload = {
"num_scenarios": 50,
"agent_id": 123,
"assistant_id": "<string>",
"personalities": [123],
"test_profile": 123,
"scenario_type": "workflow",
"expected_outcome": "<string>",
"extra_instructions": "<string>",
"generation_files": ["<string>"],
"inbound_phone_number": 123,
"first_message": "Hello",
"generate_expected_outcomes": False,
"tags": ["<string>"],
"tool_ids": ["TOOL_DTMF", "TOOL_END_CALL", "TOOL_END_CALL_ONLY_ON_TRANSFER"],
"folder_path": "<string>"
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
num_scenarios: 50,
agent_id: 123,
assistant_id: '<string>',
personalities: [123],
test_profile: 123,
scenario_type: 'workflow',
expected_outcome: '<string>',
extra_instructions: '<string>',
generation_files: ['<string>'],
inbound_phone_number: 123,
first_message: 'Hello',
generate_expected_outcomes: false,
tags: ['<string>'],
tool_ids: ['TOOL_DTMF', 'TOOL_END_CALL', 'TOOL_END_CALL_ONLY_ON_TRANSFER'],
folder_path: '<string>'
})
};
fetch('https://api.cekura.ai/test_framework/v3/scenarios/generate/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cekura.ai/test_framework/v3/scenarios/generate/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'num_scenarios' => 50,
'agent_id' => 123,
'assistant_id' => '<string>',
'personalities' => [
123
],
'test_profile' => 123,
'scenario_type' => 'workflow',
'expected_outcome' => '<string>',
'extra_instructions' => '<string>',
'generation_files' => [
'<string>'
],
'inbound_phone_number' => 123,
'first_message' => 'Hello',
'generate_expected_outcomes' => false,
'tags' => [
'<string>'
],
'tool_ids' => [
'TOOL_DTMF',
'TOOL_END_CALL',
'TOOL_END_CALL_ONLY_ON_TRANSFER'
],
'folder_path' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CEKURA-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/test_framework/v3/scenarios/generate/"
payload := strings.NewReader("{\n \"num_scenarios\": 50,\n \"agent_id\": 123,\n \"assistant_id\": \"<string>\",\n \"personalities\": [\n 123\n ],\n \"test_profile\": 123,\n \"scenario_type\": \"workflow\",\n \"expected_outcome\": \"<string>\",\n \"extra_instructions\": \"<string>\",\n \"generation_files\": [\n \"<string>\"\n ],\n \"inbound_phone_number\": 123,\n \"first_message\": \"Hello\",\n \"generate_expected_outcomes\": false,\n \"tags\": [\n \"<string>\"\n ],\n \"tool_ids\": [\n \"TOOL_DTMF\",\n \"TOOL_END_CALL\",\n \"TOOL_END_CALL_ONLY_ON_TRANSFER\"\n ],\n \"folder_path\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cekura.ai/test_framework/v3/scenarios/generate/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"num_scenarios\": 50,\n \"agent_id\": 123,\n \"assistant_id\": \"<string>\",\n \"personalities\": [\n 123\n ],\n \"test_profile\": 123,\n \"scenario_type\": \"workflow\",\n \"expected_outcome\": \"<string>\",\n \"extra_instructions\": \"<string>\",\n \"generation_files\": [\n \"<string>\"\n ],\n \"inbound_phone_number\": 123,\n \"first_message\": \"Hello\",\n \"generate_expected_outcomes\": false,\n \"tags\": [\n \"<string>\"\n ],\n \"tool_ids\": [\n \"TOOL_DTMF\",\n \"TOOL_END_CALL\",\n \"TOOL_END_CALL_ONLY_ON_TRANSFER\"\n ],\n \"folder_path\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v3/scenarios/generate/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"num_scenarios\": 50,\n \"agent_id\": 123,\n \"assistant_id\": \"<string>\",\n \"personalities\": [\n 123\n ],\n \"test_profile\": 123,\n \"scenario_type\": \"workflow\",\n \"expected_outcome\": \"<string>\",\n \"extra_instructions\": \"<string>\",\n \"generation_files\": [\n \"<string>\"\n ],\n \"inbound_phone_number\": 123,\n \"first_message\": \"Hello\",\n \"generate_expected_outcomes\": false,\n \"tags\": [\n \"<string>\"\n ],\n \"tool_ids\": [\n \"TOOL_DTMF\",\n \"TOOL_END_CALL\",\n \"TOOL_END_CALL_ONLY_ON_TRANSFER\"\n ],\n \"folder_path\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "completed",
"agent_id": 123,
"total_scenarios": 123,
"completed_scenarios": 123,
"failed_scenarios": 123,
"scenarios_list": [
{}
],
"errors": [
"<unknown>"
],
"warnings": [
"<unknown>"
],
"session_id": 123,
"current_step": "<string>"
}{
"field_name": [
"<string>"
]
}Authorizations
Body
Type of scenarios to generate: workflow (standard scenarios), red_teaming_voice (red teaming with voice-suitable prompts only), or red_teaming_text (red teaming with all prompts)
workflow- workflowred_teaming_voice- red_teaming_voicered_teaming_text- red_teaming_text
workflow, red_teaming_voice, red_teaming_text Attack category for red teaming scenarios. Required when scenario_type is red_teaming_voice or red_teaming_text. Categories: system_prompt_leak (attempts to extract the system prompt), data_leak (attempts to extract sensitive data), harmful_content (attempts to generate harmful output), biased_output (attempts to generate biased responses), unauthorized_actions (attempts to trigger unauthorized tool calls or actions), off_task (attempts to derail the conversation away from the agent's purpose)
- `` -
system_prompt_leak- system_prompt_leakdata_leak- data_leakharmful_content- harmful_contentbiased_output- biased_outputunauthorized_actions- unauthorized_actionsoff_task- off_task
, system_prompt_leak, data_leak, harmful_content, biased_output, unauthorized_actions, off_task, null Files used only as context for this generation run. Supports PDF, TXT, JSON, CSV, XML, and Markdown; the combined upload size cannot exceed 50 MB. Upload as multipart/form-data. From a Cekura chat conversation (MCP), pass the name of a file already attached to that conversation instead of the file body.
10Output format for generated workflow evaluators. Use instruction for prompt-based evaluators or conditional_actions for structured condition/action evaluators.
instruction- instructionconditional_actions- conditional_actions
instruction, conditional_actions