Developer API
The same deterministic transformations behind the web tools, over HTTP. Versioned, key-authenticated and with fair-use limits set by your account tier (returned in the x-ratelimit-* response headers).
Basics
- Base URL:
/api/public/v1 - Every operation is
POST /api/public/v1/<operation>with a JSON body containinginputplus that operation's options. - Authenticate with
x-api-key: pw_live_…. - Errors always return
{ "error": { "message": "…", "status": 400 } }. - Inputs are capped at 500,000 characters. Nothing you send is stored — only the endpoint, status and timestamp are recorded for your usage log.
Examples
curl -X POST https://your-workshop-url/api/public/v1/json-to-typescript \
-H "content-type: application/json" \
-H "x-api-key: pw_live_your_key" \
-d '{"input":"{\"id\":1,\"name\":\"Ada\"}","rootName":"User"}'const res = await fetch("https://your-workshop-url/api/public/v1/sql-format", {
method: "POST",
headers: { "content-type": "application/json", "x-api-key": process.env.PW_API_KEY },
body: JSON.stringify({ input: "select * from users where id=1", dialect: "postgresql" }),
});
const { result } = await res.json();Operations (30)
| Operation | What it does | Extra body fields |
|---|---|---|
| json-format | Pretty-print JSON. | indent (2) |
| json-minify | Minify JSON. | — |
| json-validate | Validate JSON and return the first error position. | — |
| json-to-typescript | Generate TypeScript interfaces. | rootName, useTypes |
| json-to-csharp | Generate C# classes or records. | rootName, useRecords |
| json-to-yaml | Convert JSON to YAML. | — |
| json-to-xml | Convert JSON to XML. | rootName |
| json-to-csv | Flatten a JSON array to CSV. | delimiter |
| json-schema | Infer a JSON Schema. | title |
| jsonpath | Evaluate a JSONPath expression. | path |
| analyze-response | Deterministic API response analysis. | rootName |
| openapi-schema | OpenAPI schema for a JSON response. | rootName |
| base64-encode | Encode text as Base64. | urlSafe |
| base64-decode | Decode Base64 to text. | — |
| url-encode | Percent-encode text. | component |
| url-decode | Decode percent-encoded text. | — |
| html-encode | Escape HTML entities. | — |
| html-decode | Unescape HTML entities. | — |
| jwt-decode | Decode a JWT header and payload (no signature verification). | — |
| sql-format | Format SQL. | dialect, uppercase, tabWidth |
| uuid | Generate UUID v4 values. | count |
| case-convert | Convert text case. | style (camel, pascal, snake, kebab, upper, lower, title, constant) |
| regex-test | Run a regular expression against text. | pattern, flags |
| base-convert | Convert a number between bases. | from, to, group |
| all-bases | Convert a number to all binary/octal/decimal/hex forms. | group |
| bit-width | Show signed/unsigned and two's complement for a bit width. | width (8, 16, 32, 64) |
| subnet | Calculate IPv4 subnet details. | cidr |
| cidr-to-range | Expand an IPv4 CIDR into start/end/total. | cidr |
| data-units | Convert data units from one base. | unit |
| transfer-time | Estimate transfer time. | bandwidth, overhead |