API -> Spawn for the loop function