We apply the Free Energy Principle (FEP) to cognitive behavioral therapy (CBT). FEP describes the basic functioning of the brain as a predictive organ and states that any self-organizing system that is in equilibrium with its environment must minimize its free energy. Based on an internal model of the world and the self, predictions-so-called priors-are created, which are matched with the information input. The sum of prediction errors corresponds to the Free Energy, which must be minimized. Internal models can be identified with the cognitive-affective schemas of the individual that has become dysfunctional in patients. The role of CBT in this picture is to help the patient update her/his priors. They have evolved in learning history and no longer provide adaptive predictions. We discuss the process of updating in terms of the exploration-exploitation dilemma. This consists of the extent to which one relies on what one already has, i.e., whether one continues to maintain and "exploit" one's previous priors ("better safe than sorry") or whether one does explore new data that lead to an update of priors. Questioning previous priors triggers stress, which is associated with increases in Free Energy in short term. The role of therapeutic relationship is to buffer this increase in Free Energy, thereby increasing the level of perceived safety. The therapeutic relationship is represented in a dual model of affective alliance and goal attainment alliance and is aligned with FEP. Both forms of alliance support exploration and updating of priors. All aspects are illustrated with the help of a clinical case example.