The Shiny API is split into two layers, a lower layer that handles graphical buffers and rendering, and a higher layer where the widget and layout code is located. Each layer has clear responsibilities and their separation helps to maintain a clean API.