move apiOption to the top of the file.