Refactoriza API