wait to api