In development I would like to use the API to delete all contacted except conctact_id 1 and 2. With Contact
$result=civicrm_api3('Contact', 'delete', array( 'id' => array('NOT IN' => array(1, 2)), 'skip_undelete' => "1", ));
.. won't work even though with get it does. Would seem there is no good way to do this fast, without making a complicated MySQL query. Who knows a quick work around. Mine were extremely slow and ran into error 500 timeout errors.