The output format is defined by the jsreport recipe.
https://jsreport.net/learn/recipes
The API request can specify the stored template with the right recipe.
Or, the API request can specify the recipe directly.
https://jsreport.net/learn/api