Skip to main content
POST
/
test_framework
/
v1
/
scenarios
/
generate
cURL
curl --request POST \
  --url https://api.cekura.ai/test_framework/v1/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": "happy",
  "extra_instructions": "<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"
  ]
}
'
[
  {
    "id": 123,
    "name": "<string>",
    "agent": 123,
    "assistant_id": "<string>",
    "personality": 123,
    "personality_name": "<string>",
    "tags": [
      "<string>"
    ],
    "runs": [
      123
    ],
    "metrics": [
      123
    ],
    "metric_names": [
      "<string>"
    ],
    "phone_number": "<string>",
    "phone_number_queue_length": 123,
    "first_message": "<string>",
    "inbound_phone_number": 123,
    "inbound_phone_number_data": {
      "id": 123,
      "number": "<string>",
      "phone_number_id": "<string>"
    },
    "instructions": "<string>",
    "simulation_description": "<string>",
    "information_fields": {},
    "expected_outcome_prompt": "<string>",
    "scenario_language": "<string>",
    "is_simulating": true
  }
]

Authorizations

X-CEKURA-API-KEY
string
header
required

API Key Authentication. It should be included in the header of each request.

Body

num_scenarios
integer
required

Number of evaluators to generate (1-100)

Required range: 1 <= x <= 100
agent_id
integer

ID of the agent to generate evaluator for

assistant_id
string

Alternative to agent_id - the assistant ID to generate evaluators for

personalities
integer[]

List of personality IDs to use for generated evaluators

test_profile
integer

ID of the test profile to assign to generated evaluators

scenario_type
enum<string> | null

Type of scenarios to generate: happy path, sad path, toxicity, bias, jailbreak, or hallucination

  • happy - happy
  • sad - sad
  • toxicity - toxicity
  • bias - bias
  • jailbreak - jailbreak
  • hallucination - hallucination
Available options:
happy,
sad,
toxicity,
bias,
jailbreak,
hallucination,
extra_instructions
string

Additional instructions to guide evaluator generation

inbound_phone_number
integer | null

Phone number ID to use for inbound evaluator

first_message
string
default:Hello

Initial message to start the conversation

Maximum string length: 1000
generate_expected_outcomes
boolean
default:false

If true, expected outcomes will be generated for each evaluator

tags
string[]

List of tags to apply to all generated scenarios

tool_ids
string[]

List of tool IDs to use for generated evaluators

Example:
[
"TOOL_DTMF",
"TOOL_END_CALL",
"TOOL_END_CALL_ONLY_ON_TRANSFER"
]

Response

id
integer

Unique identifier for the scenario

name
string

Name of the scenario

agent
integer

ID of the AI agent this scenario belongs to

assistant_id
string

Alternative to agent ID - the assistant ID to use for this scenario

personality
integer

ID of the personality used in this scenario

personality_name
string

Name of the personality used in this scenario

tags
string[]

Tags associated with this scenario.

runs
integer[]

List of IDs for the last run of this scenario

metrics
integer[]

List of metric IDs to associate with this scenario

metric_names
string[]

List of metric names associated with this scenario

phone_number
string

Phone number used for outbound calls in this scenario

phone_number_queue_length
integer

Number of runs in queue for this phone number

first_message
string

First message to be sent in the scenario

inbound_phone_number
integer

ID of the phone number used for inbound calls

inbound_phone_number_data
object

Details of the phone number used for inbound calls

instructions
string

Instructions for the AI agent in this scenario

simulation_description
string

Description of the simulation if this scenario was created by simulation

information_fields
object

Additional information fields for the scenario

expected_outcome_prompt
string

Expected outcome prompt for the scenario

scenario_language
string

Language of the scenario

is_simulating
boolean

Whether this scenario was created by simulation