Solution:
You can require the wordpress framework if you put this where you init the slim framework.
define('WP_USE_THEMES', false);
/** Loads the WordPress Environment and Template */
require( path-to-wp-root . '/wp-blog-header.php' );
This way it will load the wordpress framework, without initing the templates. Then you can use any wordpress function you need.