There's a new API Update out today. The main highlight of this update is:
Direct Access to the Roll Engine
You now have direct access to the results of chat commands, including rolls. You do this by passing a function which will receive the results of commands sent to the sendChat function. So instead of sending the chat results to the players, it gets passed to you immediately in the API sandbox.
https://wiki.roll20.net/API:Chat
Random Numbers
We've also added the randomInteger() utility function which will allow you to generate a random number using the same PRNG that Roll20 uses to power our dice rolls. In addition for convenience the API's Math.random() function is now replaced with one that uses our PRNG, so even if you use Math.random() we can now guarantee that you are getting statistically sound random results.
https://wiki.roll20.net/API:Utility_Functions
More will be on the way soon!