API timeout optimization