Developers

Generate diagrams from your own code — a script, a CI job, anything that can make an HTTP request. It uses an API key, which spends the same credits as the website; there is no separate balance to top up.

Your API keys

A key does not expire, so it is safe in a CI secret or an environment variable. Keep it secret all the same: anyone holding it can spend your credits. Revoke one and it stops working immediately.

Sign in to create an API key.

Calling the API directly

The key goes in the token field, exactly where a session token would. Every endpoint the website uses accepts one.

curl -X POST https://api.digramio.pro/generate/drawio/preview/start \
  -F "token=sk_skemio_your_key_here" \
  -F "input_text=A three-tier web architecture on AWS" \
  -F "mode=drawio"

That returns a diagram_id. Poll /generate/drawio/status until the preview is ready, POST /generate/drawio/approve, then poll again for the finished XML.

Credits

A key spends the balance on your account — the same one the website uses. Generation is charged on what it actually costs rather than a flat fee, and each key shows what it has spent in the table above.

Top up from the pricing section. If a key runs the balance to zero, calls fail with a clear message rather than silently doing nothing.