# API preprocessing