Code and algorithms and frameworks are only as beautiful as their external-facing APIs. If there is a conceivable API that is better than the one you’re offering, but you don’t want to go down that path because you’re afraid it would compromise the beauty or integrity of your internal code, you’re admitting you’re a handicapped developer who can’t solve hard problems, and you don’t understand what beautiful code is about.
Build the best API you can, then figure out how to make the internal implementation beautiful. If the second half of that is hard, embrace the struggle. This is your job. This is where true craftsmanship shines.
Internals matter, but it makes no sense having a beautiful flower encased in a bloody box. Your code might be worse than the final deliverable, but it can never be better. The external API is the first measuring stick that must be used to determine a code’s merit. If slighted, all else is folly.