This looks similar to what you would do to record directly from a HDHomerun device. curl http://<ip address of hdhomerun>:5004/auto/v5031 > recordedfile.ts
(The last path /v5031 should be replaced by the channel number on your device. There are no tokens etc. necessary.)
But all that has nothing to do with Plex.
As for your original question: Sorry, I don’t know the answer.
Maybe you can find it in the API documentation: https://developer.plex.tv/
If you, for example, have an HDHomeRun tuner at IP address 192,168.1.100 and you want to record virtual channel 17.1 for 30 seconds, you could use something like: curl -o showname.ts http://192.168.1.100:5004/auto/v17.1&duration=30