Min_x abs( f(x)) using cvx

if CVXPY does what you want, feel free to use it.

If f(x) is affine, then minimize(abs(f(x)) can be entered in CVX essentially “as is”.

I believe you would be out of luck with CVX if f(x) is not affine. Even an MIDCP formulation would generally not be possible in that case.