initial support for api mode (.api 1)