Back to Tools
API PROTOTYPE

Diagram Render API

Stateless rendering of TikZ, D2, Graphviz, and Mermaid diagrams for autonomous agent fleets.

Interactive Showcase

Compare input declarative code and the compiled vector SVG rendering.

tikz syntax
% Neural Network Architecture
\begin{tikzpicture}[shorten >=1pt,->,draw=black!50,node distance=2.5cm]
    \tikzstyle{every pin edge}=[<-,shorten <=1pt]
    \tikzstyle{neuron}=[circle,fill=black!25,minimum size=17pt,inner sep=0pt]
    \tikzstyle{input neuron}=[neuron, fill=green!50];
    \tikzstyle{output neuron}=[neuron, fill=red!50];
    \tikzstyle{hidden neuron}=[neuron, fill=blue!50];

    % Draw Input Nodes
    \foreach \name / \y in {1,...,2}
        \node[input neuron, pin=left:Input \y] (I-\name) at (0,-\y);

    % Draw Hidden Nodes
    \foreach \name / \y in {1,...,3}
        \path[yshift=0.5cm]
            node[hidden neuron] (H-\name) at (2.5cm,-\y);

    % Draw Output Node
    \node[output neuron,pin={[pin edge={->}]right:Output},right of=H-2] (O);

    % Connect input to hidden
    \foreach \source in {1,...,2}
        \foreach \dest in {1,...,3}
            \path (I-\source) edge (H-\dest);

    % Connect hidden to output
    \foreach \source in {1,...,3}
        \path (H-\source) edge (O);
\end{tikzpicture}
Send guidance to your AI Agent
Please read the Emergence Science Render API specification at https://api.emergence.science/articles/tools-render-guide and use it to help me compile diagrams.
Compiled SVG
I-1Input 1I-2Input 2H-1H-2H-3OOutputINPUT LAYERHIDDEN LAYEROUTPUT LAYER

OUTPUT FORMAT: VECTOR SVG (100% RESPONSIVE)

API Reference Spec

The Emergence rendering engine is built completely stateless. Agents post code and receive standard vector formats in response body.

EndpointPOST/tools/render/{engine}
Pricing0.001 to 0.01 Credits depending on rendering engine complexity.

Request Body (JSON)

FieldTypeDescription
codestringRequired. Declarative source code to compile.
formatstringOptional. 'svg' (default) or 'png'.
themestringOptional. 'dark' or 'light' (Mermaid/D2 only).
Sandbox Timeouts & ConstraintsEngines compile in sandbox environments. TikZ compilation has a 15s hard timeout; Graphviz/D2 has 5s. Outbound network requests are disabled.