Skip to main content
POST
Run AI-Generated Scenarios

Authorizations

Authorization
string
header
required

Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.

Path Parameters

agent_id
integer
required

Tuner's internal numeric ID for the agent.

workspace_id
integer
required

Workspace ID. Find this in Workspace > General Settings.

Body

application/json

Request to start a generated simulation run.

Tuner generates functional_count + adversarial_count test scenarios (5 to 20 in total), places one simulated call per scenario against the agent, and grades the calls with the agent's PASS_FAIL evals.

caller_persona_id
integer
required

ID of the caller persona (language and accent) the simulated caller uses. Get valid IDs from List Caller Personas.

Example:

1

functional_count
integer
required

Number of functional (routine) scenarios to generate.

Required range: x >= 0
Example:

4

adversarial_count
integer
required

Number of adversarial (pressure) scenarios to generate. functional_count + adversarial_count must be between 5 and 20.

Required range: x >= 0
Example:

2

max_call_duration_minutes
integer
default:3

Maximum length of each simulated call, in minutes (1-12). Defaults to 3.

Required range: 1 <= x <= 12
Example:

3

simulation_profile_id
integer | null

ID of a simulation profile belonging to this agent. Its fields are given to the simulated caller as facts about themselves. Optional.

Required range: x > 0
Example:

12

noise_environment_id
integer | null

ID of a background-noise environment to mix into the call. Get valid IDs from List Noise Environments. Must be sent together with noise_intensity.

Required range: x > 0
Example:

2

noise_intensity
number | null

Gain applied to the background noise: 0.5, 1.0 or 1.5. Must be sent together with noise_environment_id.

Example:

1

selected_eval_ids
integer[] | null

IDs of PASS_FAIL evals to grade the calls with. Omit or send null to use all of the agent's evals. If provided, it must contain at least one ID.

Example:
selected_intent_ids
integer[] | null

IDs of call intents to detect on the calls. Omit or send null to use all of the agent's intents. If provided, it must contain at least one ID.

Example:

Response

Successful Response

The simulation run that was just started.

simulation_run_id
integer
required

ID of the new simulation run.

generated_count
integer
required

Number of test scenarios created so far. 0 for Run AI-Generated Scenarios, because generation is asynchronous; the full count for replay runs and runs from saved scenarios.

success
boolean
required

Whether the run was accepted.

caller_persona_id
integer | null

ID of the caller persona used. Null for replay runs.

caller_persona
CallerPersonaResponse · object | null

The caller persona used. Null for replay runs.

simulation_profile_id
integer | null

ID of the simulation profile used, if one was given.

simulation_profile_name
string | null

Name of the simulation profile used, if one was given.

simulation_profile_snapshot
Simulation Profile Snapshot · object | null

Copy of the profile's fields as they were when the run started.

noise_environment_id
integer | null

ID of the background-noise environment used, if one was given.

noise_intensity
number | null

Gain applied to the background noise, if noise was used.

noise_environment
NoiseEnvironmentResponse · object | null

The background-noise environment used, if one was given.