This is, in practice, the utility of the widespread use of CAD. Many manufacturers of parts distribute CAD models of those parts.
For example, McMaster-Carr have CAD models (in various formats) for nearly every single part in their catalog.
A designer/engineer can import those parts and then either create drawings referenced off of those parts, or mate/join those part using reference geometry. That is to say, the API is the geometry, and the CAD software provides good tools for interacting wit that API.
MCM's 3D parts are also great starting points for stuff you'd like to print for prototyping. I just printed off a bespoke belt pulley using an MCM model as a base this past week. Added a bunch of specific mounting features I need for my application. It's an inferior part printed in FFF, but it'll work for now.
For example, McMaster-Carr have CAD models (in various formats) for nearly every single part in their catalog.
A designer/engineer can import those parts and then either create drawings referenced off of those parts, or mate/join those part using reference geometry. That is to say, the API is the geometry, and the CAD software provides good tools for interacting wit that API.