I find rails in particular to be very easy to just "api all the things" right off the bat. Add in some nice authentication / authorization with something like devise and CanCan and you will be saved from the headache of bolting an api onto your app as an afterthought.