As a Downtime Activity, you may spend 2 AP per level to retrain your character, so if you're level 5 and want to retrain all of your abilities starting from level 1, you must spend 10 AP.
It is an additional 1 AP per spirit surge and Downtime training to retrain those.