Add prefix to all routes

Yep.

$app->group('/api', function () {
    $this->get('/users/{id}','UserController:getUser');
    $this->get('/users','UserController:getUsers');
});

The code above will result in /api/user/{id} and /api/users