Heat the oven to 350°F (175°C) and line two baking sheets with parchment.
Melt the chocolate and butter over barely simmering water until smooth; cool 5 minutes.
Beat the eggs and both sugars 2 to 3 minutes until pale, thick and ribbony.
Stir the melted chocolate and vanilla into the egg mixture until glossy.
Sift in the flour, cocoa, baking powder and salt; fold until just combined.
Fold in the chocolate chips.
Drop rounded tablespoons 2 inches apart on the sheets; sprinkle with flaky salt if using. Bake 10 to 12 minutes until the tops are crackled and the edges set.
Cool on the pan 5 minutes, then move to a wire rack.