Here is an example to shorten a link for anonymous users.

curl 'https://api.u301.com/v2/shorten?url=https://github.com'

You can get the shortened URL from json result. 🎉

Go shorten api for more details.