an api creation helper