API

flowchart

The AI helper of the site's /flowchart. `build` — a chart from a description; `refine` — your existing chart (`current`) changed as the description asks; `code` — the control flow of a function. Shapes follow meaning (start/end, action, decision, input/output, storage), every edge out of a decision is labelled, at most 40 nodes; click, style and class directives are never emitted. Priced exactly like the page, per call. ASYNCHRONOUS: returns 202 with a run id — poll GET /v1/runs/{id} or register a webhook.

v1 beta server · 105 tokens

Price (server): 105 tokens per call; paid plans: −5%, rounded up. The exact figure for your file: POST /v1/tools/flowchart/estimate.

Call it

POST https://tembrica.com/v1/tools/flowchart/runs
Authorization: Bearer $TIMBRICA_KEY
Idempotency-Key: <your retry-safe key>
Content-Type: application/json

Input

FieldTypeRequiredNotes
mode string no What to do.
one of: build, refine, code
default: build
description string no `build`, `refine`: the process in words, 8–600 characters.
max length: 600
current string no `refine`: the Mermaid chart to change. Without it, `refine` builds from scratch.
max length: 4000
code string no `code`: source code, 10–4000 characters.
max length: 4000
dir string no Top-down or left-right.
one of: TD, LR
default: TD
lang string no Language of the labels. Two-letter code.
one of: ru, en, es, pt, fr, de, id, ar, ko, uk, tr
default: en

Errors it can return

validation_failed  insufficient_tokens  concurrency_limited  upstream_unavailable 

History

  • v1 — 2026-11-20 — Initial release (server lane, async, the site's price per call).

This contract cannot change without a new version and a line above: a test compares the published schema, pricing and limits against a committed lockfile and fails the build otherwise. Subscribe to /v1/changelog to be told when something moves.