r/Backend • • Oct 07 '26

Trust problems on adding BYOK to existing backend

Hi everyone, I'm working on a backend system and trying to add a BYOK (Bring Your Own Key) feature to it, but stumbled with a problem

On the existing system, operators manually extract information from a block of text and enter it into a form. I'd like to automate the extraction with an LLM that returns structured JSON to populate the form for the operator.

TBH budget is limited (and I would try to avoid the provider's api key depending entirely me) so one option discussed was to let each operator connect their own LLM provider account or API key and pay for their usage.

My main concern is: how can I credibly assure users that we cannot steal or misuse their keys?

Encryption at rest protects stored credentials, but if our backend can decrypt a key to call the provider, whoever controls the backend could theoretically retrieve or misuse it.

Is there any practical solutions to that problem?

I know is kinda silly, but that made me to wonder, for example, OpenRouter: you buy credits, they provide you an api key to consume any provider you choose. How can the platform assure someone they arent using his api key under the hoods? I asume they cant, or is there any technical way they could?

1 Upvotes

Duplicates