I currently have this in my CodeIgniter routes file. It maps anything with a URI api/controller/function to controller/api_function.
api/controller/function
controller/api_function
This Works perfectly,
$route['api/(.*)']='api/$1';