Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: AuthAI, an open-source relay for user-authorized AI sessions (github.com/authai-io)
1 point by riccardoio 1 day ago | hide | past | favorite | 1 comment
Hello HN,

My name is Riccardo and I created AuthAI for indie hackers.

The idea is quite simple: let the end users connect their chatgpt/grok/copilot account and route the AI requests through their AI subscriptions.

This enable a lot of new cool ideas where the business model/unit economics don't always make sense.

The flow is straightforward:

They click on "login with AI", choose their provider, and authorise the device on the provider's website.

Tokens get encrypted using a per-user AES-256-GCM encryption key, which isn't stored anywhere server-side and only exists within the user's JWT session. The whole security model can be found on the website/github.

Here is a demo:

https://demo.authai.io

From a developer's perspective, the objective is to stay as close to the OpenAI SDK as possible:

```ts const openai = new OpenAI({ apiKey: jwt, baseURL: "https://relay.authai.io/v1", defaultHeaders: { "x-authai-secret": process.env.AUTH_AI_SECRET, }, }); ```

Also, there is a React SDK for handling the connection flow.

* It's MIT licensed and completely open-source, there's a hosted relay available, however, the entire stack is self-hostable.

GitHub repo:

https://github.com/authai-io/authai

Would you use something like this for your generated applications and side projects? What else could I add?

 help



I'd rather just get API access and fully control the AI on my end. I'd be very unlikely of entering my creds into a 3rd party site.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: