Can I include a custom PHP function in a WordPress function?

Well, yea you kinda can do that. But it’s bad practice and it’s strongly discouraged. Cause when you call parent function the nested function is being called automatically. So basically the nested function is being called twice. Better and safest way to do it like-

// Include the file or write the nested function outside of the parent function 
include (__DIR__.'/api/short_look_up.php');
function short_api($atts){
    $api_info = get_api_info($atts);
    return $api_info;
}
add_shortcode('apii', 'short_api');