Preheat oven to 350°F. Grease an 8-inch round cake pan and line the bottom with parchment paper.
Drain and rinse the black beans well. Shake off excess water.
Add the beans, eggs, melted butter (or oil), sugar, and vanilla extract to a high-speed blender or food processor. Blend for about 60 seconds until completely smooth with no visible bean pieces.
Add the cocoa powder, baking powder, baking soda, and salt to the blender. Blend until smooth, scraping down the sides as needed. The batter should look glossy and dark.
If using chocolate chips, fold them in by hand with a spatula.
Pour the batter into the prepared pan. Tap the pan firmly on the counter a few times to release air bubbles.
Bake for 35-40 minutes, until the top is set and a toothpick inserted in the center comes out clean or with a few moist crumbs.
Let cool in the pan for 10 minutes, then flip onto a wire rack. Remove parchment and cool completely before frosting or slicing.