Skip to main content
POST
/
test_framework
/
v1
/
scenarios
/
create_scenario_from_transcript
cURL
curl --request POST \
  --url https://api.cekura.ai/test_framework/v1/scenarios/create_scenario_from_transcript/ \
  --header 'Content-Type: application/json' \
  --header 'X-CEKURA-API-KEY: <api-key>' \
  --data '
{
  "transcript_json": [
    {
      "role": "Main Agent",
      "content": "<string>",
      "end_time": 123,
      "start_time": 123,
      "data": {
        "id": "<string>",
        "name": "<string>",
        "arguments": "<unknown>",
        "result": "<unknown>"
      }
    }
  ],
  "personality": 123,
  "agent": 123,
  "assistant_id": "<string>",
  "name": "<string>",
  "expected_outcome_prompt": "<string>"
}
'
{
  "id": 123,
  "name": "<string>",
  "personality": 123,
  "personality_name": "<string>",
  "phone_number": "<string>",
  "expected_outcome_prompt": "<string>",
  "instructions": "<string>",
  "scenario_language": "af",
  "scenario_type": "instruction",
  "tags": "<unknown>",
  "agent": 123,
  "inbound_phone_number": 123,
  "inbound_phone_number_data": "<string>",
  "metrics": [
    123
  ],
  "metric_names": "<string>",
  "first_message": "Hello",
  "tool_ids": "<unknown>",
  "test_profile": 123,
  "test_profile_data": {
    "id": 123,
    "agent": 123,
    "name": "<string>",
    "information": {}
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "last_updated_by": 123
}

Authorizations

X-CEKURA-API-KEY
string
header
required

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

Body

transcript_json
object[]
required

JSON representation of the conversation transcript

personality
integer

ID of the personality to use in the simulation

agent
integer

ID of the agent to use in the simulation

assistant_id
string

Assistant ID to use in the simulation

name
string

Name for the simulated scenario

expected_outcome_prompt
string

Prompt describing the expected outcome of the scenario

Response

id
integer

Unique identifier for the AI agent Example: 123

name
string

Name of the scenario

Maximum string length: 80
personality
integer | null

Foreign key reference to the personality used in this scenario

personality_name
string

Name of the personality used in this scenario Example: "Normal Male"

phone_number
string
expected_outcome_prompt
string

Expected outcome prompt for the scenario Example: "The user should be able to complete the order"

instructions
string

Detailed instructions that guide the AI agent's behavior in this scenario

scenario_language
enum<string> | null

Language code for the scenario (ISO language code)

  • af - Afrikaans
  • ar - Arabic
  • bg - Bulgarian
  • zh - Chinese Simplified
  • cs - Czech
  • da - Danish
  • nl - Dutch
  • en - English
  • fi - Finnish
  • fr - French
  • de - German
  • el - Greek
  • hi - Hindi
  • he - Hebrew
  • hu - Hungarian
  • id - Indonesian
  • it - Italian
  • ja - Japanese
  • ko - Korean
  • ms - Malay
  • multi - Multilingual
  • no - Norwegian
  • pl - Polish
  • pt - Portuguese
  • ro - Romanian
  • ru - Russian
  • sk - Slovak
  • es - Spanish
  • sv - Swedish
  • th - Thai
  • tr - Turkish
  • ta - Tamil
  • uk - Ukrainian
  • vi - Vietnamese
Available options:
af,
ar,
bg,
zh,
cs,
da,
nl,
en,
fi,
fr,
de,
el,
hi,
he,
hu,
id,
it,
ja,
ko,
ms,
multi,
no,
pl,
pt,
ro,
ru,
sk,
es,
sv,
th,
tr,
ta,
uk,
vi,
scenario_type
enum<string>
default:instruction

Type of scenario (instruction, real_world_smart, or real_world_fixed)

  • instruction - Instruction
  • real_world_smart - Real World Smart
  • real_world_fixed - Real World Fixed
Available options:
instruction,
real_world_smart,
real_world_fixed
tags
any

List of tags associated with this scenario for categorization Example: ["tag1", "tag2", "tag3"]

agent
integer

Foreign key reference to the AI agent that owns this scenario

inbound_phone_number
integer | null

Foreign key reference to the phone number used for inbound calls

inbound_phone_number_data
string

Details of the phone number used for inbound calls

metrics
integer[]

List of metrics associated with this scenario for evaluation

metric_names
string

List of metric names associated with this scenario Example: ["Metric 1", "Metric 2", "Metric 3"]

first_message
string
default:Hello

The initial message that the AI agent will send when the scenario starts

Maximum string length: 1000
tool_ids
any

List of tool IDs that are available for use in this scenario Example: ["TOOL_DTML", "TOOL_END_CALL"]

test_profile
integer | null

Test profile ID Example: 123

test_profile_data
object

Details of the test profile associated with this scenario Example:

{
"id": "<integer>",
"agent": "<integer>",
"name": "<string>",
"information": {
"user_name": "John Doe",
"user_email": "[email protected]",
}
}
created_at
string<date-time>

Timestamp when the scenario was created

updated_at
string<date-time>

Timestamp when the scenario was last updated

last_updated_by
integer

ID of the user who last updated this scenario