Kroki provides a unified and free API for drawing diagrams. I just released a new plugin for Hexo to draw diagrams with Kroki.