Skip to main content
POST
Preview Scenario Prompt

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

Input for the scenario editor's live prompt preview (POST /scenarios/preview-prompt).

Deliberately not ScenarioAuthoringRequest: situation here may be empty (the user is mid-typing in the editor), whereas creating/updating a library scenario requires a non-blank situation. Trimming behavior is otherwise identical, reusing the same validator helpers for consistency (DRY).

situation
string
default:""
Maximum string length: 8000
goal
string | null
Maximum string length: 2000
first_line
string | null
Maximum string length: 500
stop_condition
string | null
Maximum string length: 1000

Response

Successful Response

Response for the scenario editor's live prompt preview.

prompt is the exact text build_scenario_instruction_body would produce for these inputs -- byte-identical to what a simulated call built from this same scenario would use as its instruction body.

sections
ScenarioPromptPreviewSection · object[]
required
prompt
string
required