Transcript Scenario Generation
Generate scenarios from uploaded transcripts
Generate 3 distinct simulation scenarios from previously uploaded and parsed transcript files. This is the third and final step in the three-step workflow.
The endpoint:
- Retrieves all uploaded files from Redis for the given requestId
- Combines all transcript content
- Validates minimum word count
- Calls the LLM via RPC to generate 3 scenarios
- Cleans up Redis data after successful generation
Each generated scenario includes a simulationName, personaName, personaDescription, mission, and success criteria - ready to be used for creating simulations.
POST
/
v1
/
generate-from-transcript
Generate scenarios from uploaded transcripts
curl --request POST \
--url https://api-trial.cognigy.ai/testing/v1/generate-from-transcript \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "683ef2a378a878cc6550f78b",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"flowReference": "683ef3d978a878cc6550fb9d",
"numberOfSuccessCriteria": 3
}
'import requests
url = "https://api-trial.cognigy.ai/testing/v1/generate-from-transcript"
payload = {
"projectId": "683ef2a378a878cc6550f78b",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"flowReference": "683ef3d978a878cc6550fb9d",
"numberOfSuccessCriteria": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '683ef2a378a878cc6550f78b',
requestId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
flowReference: '683ef3d978a878cc6550fb9d',
numberOfSuccessCriteria: 3
})
};
fetch('https://api-trial.cognigy.ai/testing/v1/generate-from-transcript', 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-trial.cognigy.ai/testing/v1/generate-from-transcript",
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([
'projectId' => '683ef2a378a878cc6550f78b',
'requestId' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'flowReference' => '683ef3d978a878cc6550fb9d',
'numberOfSuccessCriteria' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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-trial.cognigy.ai/testing/v1/generate-from-transcript"
payload := strings.NewReader("{\n \"projectId\": \"683ef2a378a878cc6550f78b\",\n \"requestId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"flowReference\": \"683ef3d978a878cc6550fb9d\",\n \"numberOfSuccessCriteria\": 3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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-trial.cognigy.ai/testing/v1/generate-from-transcript")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"683ef2a378a878cc6550f78b\",\n \"requestId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"flowReference\": \"683ef3d978a878cc6550fb9d\",\n \"numberOfSuccessCriteria\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-trial.cognigy.ai/testing/v1/generate-from-transcript")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectId\": \"683ef2a378a878cc6550f78b\",\n \"requestId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"flowReference\": \"683ef3d978a878cc6550fb9d\",\n \"numberOfSuccessCriteria\": 3\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"scenarios": [
{
"simulationName": "Order Status Inquiry",
"personaName": "Impatient Online Shopper",
"personaDescription": "A busy professional who ordered a product 3 days ago and hasn't received shipping updates. They are growing increasingly frustrated and want immediate answers.",
"mission": "Get a definitive answer about the order status and expected delivery date",
"successCriteria": [
{
"type": "text",
"params": {
"name": "Order Located",
"text": "The agent successfully locates and identifies the customer's order"
}
},
{
"type": "text",
"params": {
"name": "Status Communicated",
"text": "The current shipping status is clearly communicated to the customer"
}
},
{
"type": "text",
"params": {
"name": "Delivery Date Provided",
"text": "An expected delivery date is provided to the customer"
}
}
]
},
{
"simulationName": "Return Process Assistance",
"personaName": "Confused Return Requester",
"personaDescription": "A customer who received a damaged item and wants to return it but is unfamiliar with the return process. They need step-by-step guidance.",
"mission": "Successfully initiate a return for a damaged item and understand the refund timeline",
"successCriteria": [
{
"type": "text",
"params": {
"name": "Return Initiated",
"text": "A return request is successfully created for the damaged item"
}
},
{
"type": "text",
"params": {
"name": "Process Explained",
"text": "The return process steps are clearly explained to the customer"
}
},
{
"type": "text",
"params": {
"name": "Refund Timeline",
"text": "The expected refund timeline is communicated"
}
}
]
},
{
"simulationName": "Account Access Recovery",
"personaName": "Locked Out Account Holder",
"personaDescription": "A long-time customer who has been locked out of their account after multiple failed login attempts. They are anxious about accessing recent purchase history.",
"mission": "Regain access to the locked account and verify recent purchase information",
"successCriteria": [
{
"type": "text",
"params": {
"name": "Identity Verified",
"text": "The customer's identity is verified through security questions"
}
},
{
"type": "text",
"params": {
"name": "Account Unlocked",
"text": "The account is successfully unlocked and access is restored"
}
},
{
"type": "text",
"params": {
"name": "Purchase History",
"text": "The customer can access their recent purchase history"
}
}
]
}
],
"metadata": {
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"filesProcessed": 2,
"totalTextLength": 4500,
"model": "default",
"processedAt": "2026-02-08T14:35:00.000Z",
"generationTimeMs": 12500
}
}
Authorizations
bearerAuthapiKeyAuth
JWT Bearer Token for authentication
Query Parameters
Project identifier
Body
application/json
Request ID from the create-request step (all files uploaded for this request are used)
Number of success criteria per scenario (required, 1-10)
Required range:
1 <= x <= 10Project identifier
Optional flow reference (MongoDB ObjectId) for context-aware generation
Pattern:
^[a-fA-F0-9]{24}$Last modified on July 2, 2026
⌘I
Generate scenarios from uploaded transcripts
curl --request POST \
--url https://api-trial.cognigy.ai/testing/v1/generate-from-transcript \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "683ef2a378a878cc6550f78b",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"flowReference": "683ef3d978a878cc6550fb9d",
"numberOfSuccessCriteria": 3
}
'import requests
url = "https://api-trial.cognigy.ai/testing/v1/generate-from-transcript"
payload = {
"projectId": "683ef2a378a878cc6550f78b",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"flowReference": "683ef3d978a878cc6550fb9d",
"numberOfSuccessCriteria": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '683ef2a378a878cc6550f78b',
requestId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
flowReference: '683ef3d978a878cc6550fb9d',
numberOfSuccessCriteria: 3
})
};
fetch('https://api-trial.cognigy.ai/testing/v1/generate-from-transcript', 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-trial.cognigy.ai/testing/v1/generate-from-transcript",
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([
'projectId' => '683ef2a378a878cc6550f78b',
'requestId' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'flowReference' => '683ef3d978a878cc6550fb9d',
'numberOfSuccessCriteria' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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-trial.cognigy.ai/testing/v1/generate-from-transcript"
payload := strings.NewReader("{\n \"projectId\": \"683ef2a378a878cc6550f78b\",\n \"requestId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"flowReference\": \"683ef3d978a878cc6550fb9d\",\n \"numberOfSuccessCriteria\": 3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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-trial.cognigy.ai/testing/v1/generate-from-transcript")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"683ef2a378a878cc6550f78b\",\n \"requestId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"flowReference\": \"683ef3d978a878cc6550fb9d\",\n \"numberOfSuccessCriteria\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-trial.cognigy.ai/testing/v1/generate-from-transcript")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectId\": \"683ef2a378a878cc6550f78b\",\n \"requestId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"flowReference\": \"683ef3d978a878cc6550fb9d\",\n \"numberOfSuccessCriteria\": 3\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"scenarios": [
{
"simulationName": "Order Status Inquiry",
"personaName": "Impatient Online Shopper",
"personaDescription": "A busy professional who ordered a product 3 days ago and hasn't received shipping updates. They are growing increasingly frustrated and want immediate answers.",
"mission": "Get a definitive answer about the order status and expected delivery date",
"successCriteria": [
{
"type": "text",
"params": {
"name": "Order Located",
"text": "The agent successfully locates and identifies the customer's order"
}
},
{
"type": "text",
"params": {
"name": "Status Communicated",
"text": "The current shipping status is clearly communicated to the customer"
}
},
{
"type": "text",
"params": {
"name": "Delivery Date Provided",
"text": "An expected delivery date is provided to the customer"
}
}
]
},
{
"simulationName": "Return Process Assistance",
"personaName": "Confused Return Requester",
"personaDescription": "A customer who received a damaged item and wants to return it but is unfamiliar with the return process. They need step-by-step guidance.",
"mission": "Successfully initiate a return for a damaged item and understand the refund timeline",
"successCriteria": [
{
"type": "text",
"params": {
"name": "Return Initiated",
"text": "A return request is successfully created for the damaged item"
}
},
{
"type": "text",
"params": {
"name": "Process Explained",
"text": "The return process steps are clearly explained to the customer"
}
},
{
"type": "text",
"params": {
"name": "Refund Timeline",
"text": "The expected refund timeline is communicated"
}
}
]
},
{
"simulationName": "Account Access Recovery",
"personaName": "Locked Out Account Holder",
"personaDescription": "A long-time customer who has been locked out of their account after multiple failed login attempts. They are anxious about accessing recent purchase history.",
"mission": "Regain access to the locked account and verify recent purchase information",
"successCriteria": [
{
"type": "text",
"params": {
"name": "Identity Verified",
"text": "The customer's identity is verified through security questions"
}
},
{
"type": "text",
"params": {
"name": "Account Unlocked",
"text": "The account is successfully unlocked and access is restored"
}
},
{
"type": "text",
"params": {
"name": "Purchase History",
"text": "The customer can access their recent purchase history"
}
}
]
}
],
"metadata": {
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"filesProcessed": 2,
"totalTextLength": 4500,
"model": "default",
"processedAt": "2026-02-08T14:35:00.000Z",
"generationTimeMs": 12500
}
}