Move API to its own namespace
Add api key support