This is not a replacement for someone else conveniently creating an API for you but if you're interested in running your own version of this you can probably recreate this with a combination of youtube-dl[1] (Python) and ffmpeg[2] and build an API around that. Youtube-dl handles A LOT more sites than just Youtube[3]
I use both YouTube-DL and FFMPEG to accomplish this task. I will say this, creating high quality GIF is by far the easiest part of the whole thing. Bypassing too many request as well as throttling which youtube is very good at was the trickiest part and still is. Making something work for a single user is one thing, scaling so everyone else can use it is a whole different beast. The name of the game is proxy and everything revolves around that.
Thanks a lot though. youtube-dl and ffmpeg are very handy tools.