The Flowchart Generator endpoint converts a plain-language process or workflow description into a React Flow–compatible JSON structure containingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/ai360/llms.txt
Use this file to discover all available pages before exploring further.
nodes and edges arrays. Google’s Gemini 2.5 Flash model is guided by a strict system prompt that enforces flowchart rules: exactly one start and one end node, decision nodes with yes/no branches, top-to-bottom flow, and no dead ends.
The model also performs input validation — off-topic, vague, or unsafe prompts return a structured error object inside the response body rather than raising an HTTP error.
Request
A natural-language description of the process, workflow, algorithm, or
system flow you want converted into a flowchart. The more detail you
provide (steps, decision points, outcomes), the more accurate the
generated chart will be.
Response
Successful generation — HTTP 200
An array of React Flow node objects representing each step in the flowchart.
Unique, meaningful identifier for the node (e.g.
create_intent,
verify_otp).Node type. One of:
start, end, process, decision, input,
output.Short human-readable label for the node (max 6–8 words).
Absolute position on the canvas.
x and y are numbers; y increments
in steps of 150 for vertical top-to-bottom layout.An array of React Flow edge objects connecting the nodes.
Edge identifier following the pattern
source-target
(e.g. start-create_intent).The
id of the source node.The
id of the target node.Optional label on the edge. Decision nodes always produce two edges
labelled
"yes" and "no".Optional. When present, set to
"true" to animate the edge in React Flow.Model-level rejection — HTTP 200 with error body
When the prompt is off-topic, vague, or unsafe, the model returns a200 response whose body contains only an error field — no nodes or edges are present.
Always check whether the response body contains an
error key before
attempting to read nodes and edges. A model-level rejection returns
HTTP 200, not 4xx.Error Responses
| Status | Body | Cause |
|---|---|---|
400 | { "error": "Missing prompt" } | prompt was absent or empty in the request body. |
500 | { "error": "Invalid JSON from model", "raw": "<string>" } | Gemini returned output that could not be parsed as JSON. The raw text is included for debugging. |
500 | { "error": "<message>" } | Network failure, quota exceeded, or another unexpected server error. |
Flowchart Rules Enforced by the Model
- Exactly one
startnode and oneendnode per chart. - Allowed types:
start,end,process,decision,input,output. - Every
decisionnode has exactly two outgoing edges:"yes"and"no". - All paths must reach the
endnode — no dead ends. - Node labels are capped at 6–8 words.
- Vertical layout:
ypositions increment in steps of150.