Add C API bindings and sample client