You can create short ragv.im URLs on the go in your web application or any script using this api. You just need to create API key(s) for your application(s) and request our REST API on following URL that returns response in JSON format.
https://ragvim.com/shortener/api?key=YOUR_APPLICATION_API_KEY&url=YOUR_LONG_URL