Scripts are optional - you'll only need them when you want to modify your API's behavior.
How toEvaluate Workflows via API
Transform API data with Workflow scripts
Customize your API requests and responses using Workflow scripts
Maxim Workflows provide powerful scripting capabilities to modify requests and responses. These scripts help you transform data, add authentication, and handle complex response structures.
Pre-request Script
The prescript
function runs before sending requests to your API. Use it to modify request parameters, add headers, or transform data.
Post-response Script
The postscriptV2
function processes API responses before displaying them. Use it to transform response data or extract specific fields:
Simulation Scripts
Simulation scripts only run for multi-turn conversations. They won't execute for single-turn tests.
Use these scripts to set up and clean up multi-turn conversation tests: