So a few months ago, I was trying to work out how to create an instance of a marketplace API App via code. There was no API or samples for this at the time. API Apps (like Logic/Mobile/Web apps) can be deployed using ARM templates, so it was just a matter of working out what to put in the template.
Since then, the AAS team have released a guide on what needs to go in the template, what the contract looks like, and supplied a sample on GitHub