api begin