Is there an API or online program that does the bitcoin to bank automatically?
As much as I know there is no API or online system who automatically convert bitcoin to fiat and deposit in your bank account. And I don't think so it's needed because its cause lot of problem. In first place if it's automatic then you don't know on which price they are going to convert and deposit fiat in your bank account.
And if you really need cash then don't go with bitcoin. You can directly sold your stuff for fiat.
Also if you have bitcoin and need to cash then use Bitcoin ATM if it's available in your area or you can can use peer to peer exchange That's the best way.