add early version of fx-api.[ch]