api emulation