Skip to content
Fourohtwo

api.sitecheck-api.workers.dev/api/sql/generate

SQL from a question and a schema (CREATE TABLE statements or a JSON description of tables and columns), for postgres (default), mysql, sqlite or bigquery. The tables and columns used are checked against the schema; a query that does not match it is retried once, then refused. Writes (INSERT, UPDATE, DELETE, DDL) are refused unless allowWrite is true. The query is not run.

BaseSolanaArcPolygonArbitrumWorld Chain+1Unchecked
POSThttps://api.sitecheck-api.workers.dev/api/sql/generate

UptimeNot checked yet

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

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://api.sitecheck-api.workers.dev/api/sql/generate", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"dialect":"postgres","question":"How many orders were placed in 2025?","schema":"CREATE TABLE orders (id integer primary key, placed_at timestamp, total numeric(10,2));"}),
});
console.log(await res.json());

Example input

{
  "dialect": "postgres",
  "question": "How many orders were placed in 2025?",
  "schema": "CREATE TABLE orders (id integer primary key, placed_at timestamp, total numeric(10,2));"
}

More from SiteCheck