code.halowerk.com/v1/ddl-to-erd
Turn SQL CREATE TABLE statements into a Mermaid erDiagram with columns, PK/FK/UK markers and relationship cardinalities derived from nullability and uniqueness. Parses DDL with node-sql-parser 5.4.0 (PostgreSQL, MySQL, MariaDB, SQLite, BigQuery, Snowflake, T-SQL, Redshift grammars): CREATE TABLE with inline and table-level PRIMARY KEY, UNIQUE, REFERENCES and FOREIGN KEY, ALTER TABLE ... ADD [CONST
POST
https://code.halowerk.com/v1/ddl-to-erdUptime100% of 4 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://code.halowerk.com/v1/ddl-to-erd", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"ddl":"CREATE TABLE customer (id SERIAL PRIMARY KEY, email VARCHAR(255) NOT NULL UNIQUE);\nCREATE TABLE orders (id BIGINT PRIMARY KEY, customer_id INT NOT NULL REFERENCES customer(id), total NUMERIC(10,2));","dialect":"postgres"}),
});
console.log(await res.json());Example input
{
"ddl": "CREATE TABLE customer (id SERIAL PRIMARY KEY, email VARCHAR(255) NOT NULL UNIQUE);\nCREATE TABLE orders (id BIGINT PRIMARY KEY, customer_id INT NOT NULL REFERENCES customer(id), total NUMERIC(10,2));",
"dialect": "postgres"
}