use config to construct api prefix