Kroki
APIFree API to generate diagrams from textual descriptions
Overview
Kroki is a RESTful API that converts textual diagram definitions into visual outputs. It supports over 20 diagram languages (PlantUML, Mermaid, Graphviz, D2, etc.). Endpoints accept POST requests with diagram source and type, returning formats like SVG, PNG, PDF, or JSON (for errors). Use cases include embedding diagrams in documentation (Markdown, Confluence), generating diagrams from code comments, or integrating into CI/CD pipelines for automated updates without local tooling.
Example Integration (JavaScript)
fetch('https://kroki.io')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err)); Key Features
- RESTful API
- 20+ diagram language support
- Multiple output formats (SVG, PNG, PDF)
- No API key required (public instance)
- Open source
Frequently Asked Questions
? Is Kroki free to use?
Yes, the public instance at kroki.io is free with rate limits. Additionally, Kroki is open source, so you can self-host it for free without restrictions.
? Does it require an API Key?
No, the public Kroki instance does not require an API key for standard usage. Self-hosted instances can be configured with or without authentication.
? What is the response format?
Kroki returns visual outputs like SVG, PNG, or PDF based on your request. Error responses are typically in JSON format.
Top Alternatives
People Also Ask about Kroki
Tool Info
Pros
- ⊕ Easy integration with tools/docs
- ⊕ Wide diagram type coverage
- ⊕ Lightweight request payloads
- ⊕ Self-hostable option
Cons
- ⊖ Public instance rate-limited
- ⊖ No official SLA for free use
- ⊖ Advanced customization may need self-hosting