Possible to Test API with localhost



My application is in development mode and we don’t have specific URL. Is it possible to set localhost URL for application and get hapikey? I want to do with Ajax Post Method.

I am really new to this integration and have to do things in less time so any help would be really appreciated.