{"openapi":"3.1.0","info":{"title":"Butterworth Filter API","version":"1.0.0","description":"Butterworth-filter design maths as an API, computed locally and deterministically. The order endpoint computes the minimum filter order needed to meet a specification — from the passband edge frequency and its allowed ripple and the stopband edge frequency and its required attenuation it returns the exact and rounded-up order, n = ⌈log10((10^(As/10)−1)/(10^(Ap/10)−1)) / (2·log10(fs/fp))⌉, where each extra order adds 20 dB per decade of roll-off. The response endpoint computes the maximally-flat magnitude response of an n-th order Butterworth filter at a frequency, |H| = 1/√(1 + (f/fc)^(2n)), in linear and decibel form with the attenuation and the asymptotic roll-off — the response is exactly −3.01 dB at the cutoff for any order. The poles endpoint gives the s-plane pole locations, equally spaced on a circle of radius ωc in the left half-plane at angles π·(2k+n−1)/(2n), all stable. Frequencies are in hertz (or any consistent unit), ripple and attenuation in decibels and the order a positive integer. Everything is computed locally and deterministically, so it is instant and private. Ideal for DSP, audio, RF, instrumentation and embedded app developers, anti-aliasing and filter-design tools, and signal-processing education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is the Butterworth filter; for a single-pole RC cutoff and resonance use a resonance API and for AC impedance an impedance API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/butterworth-api","description":"oanor gateway"}],"tags":[{"name":"Butterworth"},{"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/order":{"get":{"operationId":"get_v1_order","tags":["Butterworth"],"summary":"Minimum filter order","description":"","parameters":[{"name":"passband_edge","in":"query","required":true,"description":"Passband edge (Hz)","schema":{"type":"string"},"example":"1000"},{"name":"stopband_edge","in":"query","required":true,"description":"Stopband edge (Hz)","schema":{"type":"string"},"example":"4000"},{"name":"passband_ripple","in":"query","required":true,"description":"Passband ripple Ap (dB)","schema":{"type":"string"},"example":"1"},{"name":"stopband_attenuation","in":"query","required":true,"description":"Stopband attenuation As (dB)","schema":{"type":"string"},"example":"40"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Minimum Butterworth order n = ⌈log10((10^(As/10)−1)/(10^(Ap/10)−1)) / (2·log10(fs/fp))⌉. Each extra order adds 20 dB/decade of roll-off.","order":4,"inputs":{"passband_edge":1000,"stopband_edge":4000,"passband_ripple":1,"stopband_attenuation":40},"exact_order":3.80924},"meta":{"timestamp":"2026-06-05T11:30:22.952Z","request_id":"2e025c7a-774a-48e2-b446-fdb32c5fa507"},"status":"ok","message":"Filter order","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/poles":{"get":{"operationId":"get_v1_poles","tags":["Butterworth"],"summary":"Pole locations","description":"","parameters":[{"name":"order","in":"query","required":true,"description":"Filter order n","schema":{"type":"string"},"example":"4"},{"name":"cutoff","in":"query","required":false,"description":"Cutoff ωc (default 1)","schema":{"type":"string"},"example":"1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Butterworth poles lie equally spaced on a circle of radius ωc in the left half of the s-plane, at angles π·(2k+n−1)/(2n). They are all stable (negative real part).","poles":[{"imag":0.92387953,"real":-0.38268343,"angle_deg":112.5},{"imag":0.38268343,"real":-0.92387953,"angle_deg":157.5},{"imag":-0.38268343,"real":-0.92387953,"angle_deg":202.5},{"imag":-0.92387953,"real":-0.38268343,"angle_deg":247.5}],"inputs":{"order":4,"cutoff":1}},"meta":{"timestamp":"2026-06-05T11:30:23.019Z","request_id":"f878f0e9-5fe0-4ce5-bc85-2747919f173a"},"status":"ok","message":"Pole locations","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/response":{"get":{"operationId":"get_v1_response","tags":["Butterworth"],"summary":"Magnitude response","description":"","parameters":[{"name":"order","in":"query","required":true,"description":"Filter order n","schema":{"type":"string"},"example":"4"},{"name":"frequency","in":"query","required":true,"description":"Frequency (Hz)","schema":{"type":"string"},"example":"2000"},{"name":"cutoff","in":"query","required":true,"description":"Cutoff frequency fc (Hz)","schema":{"type":"string"},"example":"1000"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Magnitude |H| = 1/√(1 + (f/fc)^(2n)). At fc the response is exactly −3.01 dB for any order; far above fc the roll-off is 20·n dB/decade.","inputs":{"order":4,"cutoff":1000,"frequency":2000},"magnitude":0.06237829,"magnitude_db":-24.099331,"attenuation_db":24.099331,"rolloff_db_per_decade":80},"meta":{"timestamp":"2026-06-05T11:30:23.109Z","request_id":"2bd76ec6-7285-4ccb-8cce-30bb6d421aa0"},"status":"ok","message":"Magnitude response","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":{"notes":"Frequencies in Hz (or any consistent unit), attenuations and ripple in dB, order a positive integer. The Butterworth response is maximally flat in the passband with no ripple.","service":"butterworth-api","formulae":{"order":"n = ⌈log10((10^(As/10)−1)/(10^(Ap/10)−1)) / (2·log10(fs/fp))⌉","poles":"s_k = ωc·exp(jπ(2k+n−1)/(2n))","response":"|H| = 1/√(1 + (f/fc)^(2n))"},"endpoints":{"GET /v1/meta":"This document.","GET /v1/order":"Minimum filter order from passband/stopband edges and attenuations.","GET /v1/poles":"Left-half-plane pole locations of an n-th order Butterworth.","GET /v1/response":"Magnitude (and dB) of an n-th order Butterworth at a frequency."},"description":"Butterworth filter calculator: the minimum order for a specification, the maximally-flat magnitude response, and the s-plane pole locations."},"meta":{"timestamp":"2026-06-05T11:30:23.183Z","request_id":"900424a0-3bdc-493e-b7fc-2888a98067ec"},"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":2900,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":900,"monthly_call_quota":40000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2400,"monthly_call_quota":250000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7200,"monthly_call_quota":1690000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/butterworth-api"}