Error in civix generate:api "You cannot change the session module's ini settings at this time"
As a workaround, you can create manually the Create.php file that contains civicrm_api3_invoice_create()

Check the api/v3 folder in the core for examples (eg. the email one)

As for civix, do you have the latest version? if it's the case, fill a bug on github