Great idea! I like the ergonomics of this for the developer-side, it's easy to add and puts the onus on the developer to have a robust auth system that avoids users creating 1000s of accounts so they can get unlimited LLM access.
One challenge on frontend-only apps is if the prompt is proprietary then this will be exposed unless you will then offer prompt templating or prompt mapping on your side i.e. the frontend says prompt: Template_123 and then this maps to the actual prompt somehow. Prompting is important still and maybe for a while so having the internals externally available could be sensitive.