{"openapi":"3.1.0","info":{"title":"Minify API","version":"1.0.0","description":"Shrink your web assets. Minify CSS, JavaScript and HTML through one simple API and get back the compact output plus how many bytes (and what percent) you saved. CSS is minified with clean-css, JavaScript with Terser (with optional name-mangling and compression toggles), and HTML with html-minifier-terser (collapsing whitespace, dropping comments and redundant attributes, and minifying inline CSS and JS). Pass the source as a parameter or in the request body (up to 5 MB). Pure local processing — no key, no third-party service, instant. Live. 4 endpoints. Built for build pipelines, on-the-fly asset optimisation, email-HTML slimming, CMS and CDN tooling, and page-speed work.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/minify-api","description":"oanor gateway"}],"tags":[{"name":"Minify"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/css":{"get":{"operationId":"get_v1_css","tags":["Minify"],"summary":"Minify CSS","description":"","parameters":[{"name":"code","in":"query","required":true,"description":"CSS source","schema":{"type":"string"},"example":"body { color: red; margin: 0 0 0 0; }"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"minified":"body{color:red;margin:0}","saved_bytes":13,"minified_size":24,"original_size":37,"saved_percent":35.14},"meta":{"timestamp":"2026-06-02T16:51:57.196Z","request_id":"14b462c4-a6e0-4976-92cf-c965752d4062"},"status":"ok","message":"Minify CSS","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/html":{"get":{"operationId":"get_v1_html","tags":["Minify"],"summary":"Minify HTML","description":"","parameters":[{"name":"code","in":"query","required":true,"description":"HTML source","schema":{"type":"string"},"example":"<div>  <!-- c --> <p>hi</p> </div>"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"minified":"<div><p>hi</p></div>","saved_bytes":14,"minified_size":20,"original_size":34,"saved_percent":41.18},"meta":{"timestamp":"2026-06-02T16:51:57.306Z","request_id":"5a997430-3203-4e90-85a1-fcabcb28521d"},"status":"ok","message":"Minify HTML","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/js":{"get":{"operationId":"get_v1_js","tags":["Minify"],"summary":"Minify JavaScript","description":"","parameters":[{"name":"code","in":"query","required":true,"description":"JavaScript source","schema":{"type":"string"},"example":"function add(a, b) { return a + b; }"},{"name":"mangle","in":"query","required":false,"description":"false to disable name mangling","schema":{"type":"string"}},{"name":"compress","in":"query","required":false,"description":"false to disable compression","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"minified":"function add(n,d){return n+d}","saved_bytes":7,"minified_size":29,"original_size":36,"saved_percent":19.44},"meta":{"timestamp":"2026-06-02T16:51:57.403Z","request_id":"feb337d9-7a94-4e8e-9fa1-78bc4712a4d4"},"status":"ok","message":"Minify JavaScript","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"auth":"none upstream; this gateway requires x-api-key","name":"Minify API","note":"Minify web assets. /v1/css, /v1/js (terser; ?mangle=&?compress= toggles) and /v1/html — pass ?code= the source (or POST body, up to 5 MB). Each returns the minified output plus original/minified size and the percent saved. Instant, nothing stored.","source":"Local minification (clean-css, terser, html-minifier-terser) — no key, no upstream","endpoints":4},"meta":{"timestamp":"2026-06-02T16:51:57.484Z","request_id":"33e1943c-2b1b-4a1a-9c85-77ed6dd9f162"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":1400,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":580,"monthly_call_quota":23000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2540,"monthly_call_quota":172000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6140,"monthly_call_quota":880000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/minify-api"}