First pass at api.