Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Kroki API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fkroki.io%2Fkroki" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fkroki.io%2Fkroki" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Kroki API.
Render a diagram from its text source by POSTing it to the path for its type, such as /mermaid/svg or /plantuml/png
Pick the diagram type at request time with POST / and a JSON body of diagram_source, diagram_type, and output_format
Build shareable image URLs by compressing the source with deflate and URL-safe base64 into the source_encoded path segment of a GET request
Tune output per library with query options such as theme and scale for PlantUML, layout and sketch for D2, or layout for Graphviz
GET STARTED
Read structured JSON errors whose type distinguishes diagram-error, unsupported-format, and uri-too-long, with the line and column of a syntax problem
Check the instance and the version of each diagram library through the /health endpoint, and scrape Prometheus metrics from /metrics
Patterns agents use Kroki API for, with concrete tasks.
★ AI agent drawing diagrams on request
An agent asked to explain a system writes the diagram as Mermaid or PlantUML text, searches Jentic for 'render a Mermaid diagram as SVG', and calls the matching Kroki operation such as postMermaidInFormat with the source as the body. Kroki returns the rendered SVG, so the agent can attach a real image instead of a code block, and if the source is invalid the JSON error names the line and column to fix before retrying.
POST a Mermaid flowchart source as the request body to /mermaid/svg and save the returned image/svg+xml response as architecture.svg
Diagrams-as-code in documentation pipelines
Docs written in Markdown or AsciiDoc often keep diagrams as PlantUML, Graphviz, or Structurizr source. A build step sends each block to the Kroki path for its type and output format, for example /plantuml/svg or /structurizr/png, and embeds the returned image, so the rendered docs stay in step with the diagram source in the repo. PlantUML and C4-PlantUML also support pdf, txt, and utxt outputs.
POST a PlantUML component diagram to /plantuml/pdf and store the returned application/pdf file alongside the docs build output
Shareable diagram image URLs
For a README, an issue, or a chat message, a GET link is easier to share than a file. Compress the diagram source with deflate (zlib), encode it as URL-safe base64, and place it in the source_encoded segment of a path such as /graphviz/svg/{source_encoded}. Anyone who opens the link gets the rendered image, and very long sources return a uri-too-long error, at which point the POST form is the fallback.
Deflate and URL-safe base64 encode a dot graph, then GET /graphviz/svg/{source_encoded} with it and return the URL for use in a README
One endpoint for many diagram languages
Tools that accept user-written diagrams in many languages can send every one to POST / with a JSON body naming diagram_type, such as mermaid, d2, wavedrom, or vegalite, plus diagram_source and output_format. That keeps a single code path for all 32 diagram types the spec enumerates, while per-type options travel in diagram_options.
POST / with diagram_type d2, output_format svg, and diagram_source containing a D2 graph, then return the rendered SVG
103 endpoints — the kroki api renders diagrams from plain-text descriptions, turning mermaid, plantuml, graphviz, d2, bpmn, excalidraw, vega-lite, and 25 more diagram languages into images.
METHOD
PATH
DESCRIPTION
/
Render a diagram whose type is named in the JSON body
/mermaid/{output_format}
Render a Mermaid diagram to SVG or PNG
/plantuml/{output_format}
Render a PlantUML diagram to SVG, PNG, PDF, or text
/graphviz/{output_format}
Render a Graphviz diagram
/d2/{output_format}
Render a D2 diagram
/mermaid/{output_format}/{source_encoded}
Render a Mermaid diagram encoded in the URL
/health
Health check with diagram library versions
/
Render a diagram whose type is named in the JSON body
/mermaid/{output_format}
Render a Mermaid diagram to SVG or PNG
/plantuml/{output_format}
Render a PlantUML diagram to SVG, PNG, PDF, or text
/graphviz/{output_format}
Render a Graphviz diagram
/d2/{output_format}
Render a D2 diagram
/mermaid/{output_format}/{source_encoded}
Render a Mermaid diagram encoded in the URL
/health
Health check with diagram library versions
What agents get from Jentic-routed access to this vendor.
Setup
Wiring Kroki by hand means learning a separate path and format list for each of 32 diagram types, deflating and base64url-encoding sources for GET links, and parsing its JSON error types. Through Jentic you install once, import Kroki from the API Directory, and your agent calls it with no credential to manage.
Permission scoping
Kroki puts the diagram type in the URL path (/mermaid/..., /plantuml/...), so a rule can hold your agent to the diagram languages and operations you pick. The generic POST / carries the type in its body instead, so leave it out when you want that bound to hold, and the metrics and health endpoints are not included unless you add them.
Credential isolation
The Kroki public instance declares no authentication, so there is nothing to store. For any API you add that does use a key, your own Jentic One instance keeps it encrypted and injects it at execution time, out of the agent's prompt, logs, and context.
Intent-based discovery
Agents search Jentic by intent such as 'render a PlantUML diagram as PNG' or 'convert Graphviz to SVG', and Jentic returns the matching Kroki operation with its input schema so the agent calls the right diagram path without browsing the reference docs.
Alternatives and complements available in the Jentic catalogue.
Specific to using Kroki API through Jentic.
Does the Kroki API need authentication?
No. The OpenAPI spec for the public Kroki instance declares no security schemes, so render requests are sent without an API key or token. Through Jentic your agent calls it with nothing to store.
Which diagram types can the Kroki API render?
The spec enumerates 32 diagram types, including actdiag, blockdiag, bpmn, bytefield, c4plantuml, d2, dbml, diagramsnet, ditaa, dot, erd, excalidraw, graphviz, mermaid, nomnoml, pikchr, plantuml, structurizr, svgbob, tikz, vega, vegalite, wavedrom, and wireviz. Output formats differ by type: Mermaid offers png and svg, while PlantUML adds pdf, base64, txt, and utxt.
How do I put a diagram in a Kroki URL?
Compress the diagram source with deflate (zlib), encode the result as URL-safe base64, and use it as the source_encoded path segment, for example in GET /mermaid/{output_format}/{source_encoded}. For large diagrams that would exceed URL limits, POST the source to /mermaid/svg instead.
What are the rate limits for the Kroki API?
The OpenAPI spec does not specify rate limits. Check the Kroki documentation at https://docs.kroki.io for guidance on using the public instance.
Is there a Kroki MCP server?
You don't need an MCP server to give your agent the Kroki API. Jentic connects it directly from the API Directory: import it and your agent calls the render operation for the diagram type it needs, without loading a separate server's tool definitions into its context.
How do I render a Mermaid diagram with the Kroki API through Jentic?
Search Jentic for 'render a Mermaid diagram as SVG', load the postMermaidInFormat operation, and execute POST /mermaid/{output_format} with svg as the format and the Mermaid source as the body. To run it on your own infrastructure, install Jentic One from its GitHub repo.
Can I limit what my agent is allowed to do with the Kroki API?
Yes. Write a rule that allows only POST /mermaid/svg and POST /plantuml/svg, and the agent can render SVG diagrams in those two languages and nothing else, while the metrics endpoint and the other diagram paths stay off its list. Every call it makes is logged.
For Agents
Render Mermaid, PlantUML, Graphviz, D2, and other text diagram languages to SVG, PNG, or PDF with a single HTTP call, using library-specific options and line-numbered error reports.
Use for: Render this Mermaid flowchart as an SVG, I need to turn a PlantUML sequence diagram into a PNG for a pull request, Convert a Graphviz dot graph to an image, Get a PDF of this BPMN process diagram
Not supported: Does not store, edit, version, or share diagrams, and does not convert existing image or document files. Use for rendering text diagram source into SVG, PNG, PDF, or text output only.
The Kroki API renders diagrams from plain-text descriptions, turning Mermaid, PlantUML, Graphviz, D2, BPMN, Excalidraw, Vega-Lite, and 25 more diagram languages into images. Each diagram type has its own path: POST the source as the request body, or GET it with the source compressed with deflate and encoded as URL-safe base64 in the path, and choose an output format such as svg, png, or pdf where the library supports it. Diagram options such as theme, scale, or layout go in query parameters or Kroki-Diagram-Options headers, and errors come back as JSON with a type such as diagram-error plus the line and column the diagram library reports. The spec describes the public instance at kroki.io, where no authentication is declared.
This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.
Base layer of spec validity and structural soundness.
Aggregated quality score from linter diagnostics, weighted by severity.
Percentage of `$ref` references that resolve successfully.
Checks whether the API description parses successfully and conforms to its declared specification (e.g., OpenAPI).
Structural correctness score based on schema issues using logarithmic dampening.
Clarity, completeness, and ingestion readiness for developers and tooling.
How richly the API is illustrated with examples.
Percentage of examples that conform to their schemas.
Percentage of operations with complete response definitions (success, client error, server error).
Health of API ingestion, bundling, and resolution within Jentic pipelines.
Semantic breadth, depth, and agent comprehension for AI systems.
Coverage of descriptions across API elements.
Coverage of RFC 9457 Problem Details for error responses.
Coverage, uniqueness, and casing consistency of operationIds for AI inference.
Coverage of summaries across operations/tags/info.
Functional utility, complexity comfort, and AI orchestration readiness.
Agent comfort level based on API operational and structural complexity.
Trust, risk posture, and security compliance.
Average quality of security schemes based on authentication method strength (weakest link for OAuth2).
Findability, semantic richness, and reasoning readiness.
Clarity and depth of descriptions across API elements.
Score it yourself
Every API in the directory is allowlisted, so you can re-score it with no key required.
npx @jentic/api-scorecard-cli score <openapi-url>