Rough skeleton of API (@jerith, @hodgestar).