Skip to content

rombik API

HTTP API for flowcharts & structograms from your scripts. Authenticate with the X-API-Key header.

Full API reference

All endpoints, parameters, code samples in several languages and try-it — interactive, on its own page.

Open the reference →

What /render can do

One endpoint, more knobs than it looks. Everything below is a parameter of the same call.

10 languages
python, cpp, c, java, csharp, pascal, javascript, typescript, php, go — plus rombik: your own chart tree (astJSON) for any other language.
14 formats
docx, visio, drawio, typst, excalidraw, svg, png, jpeg, webp, gif, gif_anim, pdf, html, json — docx and visio come out as native shapes you can keep editing.
Images and a web page
jpeg — a raster on white; webp — lossless and lighter than png; gif — static, 256 colours; gif_anim — the chart draws itself block by block, on a loop; html — the chart and the code with line numbers on one page. With json: true rasters come back base64 like png, and html comes as text like svg.
Two diagram kinds
mode: "flow" — a standard flowchart; mode: "nsd" — a Nassi-Shneiderman structogram.
Source: code or a link
pass url instead of code: raw.githubusercontent.com, gist, gitlab, bitbucket, codeberg (github.com/…/blob/… links normalize themselves).
Batches up to 100 sources
/render/batch builds a multi-page PDF or a zip; the response carries X-Rombik-Rendered and X-Rombik-Failed headers.
Fine tuning
the options object: locale, your own words on the yes/no branches, terminators, figure numbering, scale, font. Tall charts split with A/Б connectors via split.
Poster
format: "poster" — code and chart side by side in one image for social media.

Integrations & tools

For AI agents

A ready-made skill in the open Agent Skills format — Claude Code, Codex, GitHub Copilot, Cursor, Gemini CLI and more.

Install into your agent
sh
npx skills add OlexiyOdarchuk/rombik-skill
Skill on GitHub →

rombik CLI

Work with the API straight from your terminal.

macOS / Linux
sh
curl -fsSL https://rombik.app/install.sh | sh
Windows commands
Windows (PowerShell)
ps1
irm https://rombik.app/install.ps1 | iex
Windows (CMD)
cmd
curl -fsSL https://rombik.app/install.cmd -o "%TEMP%\rombik-install.cmd" && "%TEMP%\rombik-install.cmd"
All commands
sh
rombik auth                                   # sign in via the browser (or: rombik auth rk_…)
rombik render main.py -f pdf -o chart.pdf
rombik render app.ts -f drawio -o app.drawio
rombik render main.go --structogram -f svg    # Nassi-Shneiderman structogram
cat prog.cpp | rombik render - --lang cpp -f png -o prog.png
rombik render --url https://raw.githubusercontent.com/…/main.py -f svg
rombik render main.py -f pdf --link           # plus a temporary link to the result
rombik batch src/*.py -f pdf -o project.pdf   # many sources at once
rombik me                                     # plan and monthly limit
rombik products                               # plan catalog
rombik topup 3                                # payment link for the plan with id 3
rombik mcp                                    # MCP server over stdio
rombik version --json                         # {version, latest, updateAvailable}
rombik update                                 # update to the latest version
rombik logout                                 # remove the saved key

The key is never passed as an argument — only via the ROMBIK_API_KEY variable or the config written by “rombik auth”. The API base is ROMBIK_API_URL. Full flag list: “rombik render -h”.

Install manually

The install command above auto-detects your system. These are direct binary links.

MCP server

The agent gets render_flowchart, balance, products, topup_link. Two ways in: a remote server — no install at all, or locally via the CLI (stdio).

Remote — no install
url
https://rombik.app/mcp

Paste the address into your MCP client (ChatGPT connectors, Claude, Cursor…) — sign-in opens in the browser by itself (OAuth), no keys to type. Access is revocable in your account.

Claude Code
sh
claude mcp add --transport http rombik https://rombik.app/mcp
Clients with a JSON config
json
{
  "mcpServers": {
    "rombik": { "url": "https://rombik.app/mcp" }
  }
}
Locally via the CLI (stdio)

Install the CLI and run “rombik auth” first, then add the config to your client. The key lives in a config file and never enters the model context.

Claude Code
sh
claude mcp add rombik -- rombik mcp
Cursor / Windsurf (JSON)
json
{
  "mcpServers": {
    "rombik": { "command": "rombik", "args": ["mcp"] }
  }
}

Temporary links to a result

When there is nowhere to show the file — a chat bot, a webhook, an email — hand out a link instead of bytes. Post the render result to /r and get a public address that lives an hour: images and PDFs open right in the browser, everything else downloads. The CLI does the same with --link, and remote MCP uses the same store.

Sign in with rombik

Your app can ask people to sign in with their rombik account. The user sees a consent page with your app name, clicks “Allow” — and you get an API key that renders charts under their plan. It is plain OAuth 2.0 (authorization code + PKCE) with OpenID Connect on top, so any standard library works.

  1. 1 Register your app

    One call to /oauth/register with a name and redirect URIs returns a client_id. Registration is open — no approval to ask for. A server-side app also gets a secret; a mobile app, SPA or CLI needs none — PKCE protects those.

  2. 2 Get the user’s consent

    Open the /oauth/authorize page for them. They see your app name, click “Allow” and come back to your address with a one-time code. The code lives 10 minutes.

  3. 3 Exchange the code for a token

    A call to /oauth/token with the code and the PKCE check returns an access_token. It is a regular rombik API key — no separate logic after that, every endpoint works. The openid scope adds an id_token with the identity to the same response.

  4. 4 Act on the user’s behalf

    Who they are — /oauth/userinfo; keys to verify the id_token signature — /oauth/jwks. Then plain /render — under the user’s plan.

Libraries with discovery support configure themselves — give them the metadata URLs: https://rombik.app/.well-known/oauth-authorization-server https://rombik.app/.well-known/openid-configuration

Worth knowing
  • Rendering runs under the plan of the user who consented (Pro required), not yours.
  • The token does not expire. The user can revoke access in their account at any time — the key disappears and calls start returning 401.
  • PKCE (S256) is mandatory for clients without a secret; the plain method is rejected.
  • Instead of registering, client_id may be an https URL to your app’s metadata document — such a client is always treated as public.
  • The app name from the consent page is what the user sees in the access list in their account.
Parameters, response fields and try-it — in the API reference →

Рідний формат rombik / rombik native format

For unsupported languages, use lang:"rombik" and pass astJSON (requires Pro).

Full specification — /api/v1/rombik-format.md.

view the spec →

So, what does it cost?

No separate “API pricing”: API, CLI and MCP come with the Pro plan together with the editor — the same monthly export limit as on the site. Get it on the pricing page or via topup_link in MCP.

Pricing →

Ready to start?