AuthAI, an open-source relay for user-authorized AI sessions logo

AuthAI, an open-source relay for user-authorized AI sessions

Free
FreeFree tier
Type
Open Source

About AuthAI, an open-source relay for user-authorized AI sessions

AuthAI is an open-source relay that lets end users pay for AI features using their existing ChatGPT, Grok, or GitHub Copilot subscriptions. Users sign in via OAuth, and your app calls AI models on their behalf—keeping costs on the user's plan. It offers a hosted service at authai.io (free, no setup) or the option to self-host. The relay uses each provider's public device-code OAuth flow, similar to official CLIs. Security is handled with per-record AES-256 encryption: OAuth tokens are encrypted with a key embedded in the user's JWT, never stored server-side. The project is experimental and intended for personal projects and demos.

Key Features

Users sign in via OAuth with ChatGPT, Grok, or GitHub Copilot subscriptions
Drop-in React component for frontend integration
Compatible with the official OpenAI SDK by pointing base URL at the relay
Two deployment options: free hosted service at authai.io or self-hosted relay
Per-record AES-256 encryption of OAuth tokens; keys live only in user JWTs
Uses each provider's public device-code OAuth flow

Pros & Cons

Pros
  • Free hosted option with no setup required (authai.io)
  • Open-source and self-hostable for full control
  • Strong security model: encrypted tokens, keys never server-side
  • Easy integration with existing OpenAI SDK workflow
  • Users pay with subscriptions they already have
Cons
  • Experimental project not recommended for production use
  • Uses unofficial OAuth flows that providers can change without notice
  • Not affiliated with OpenAI, GitHub, or xAI

Best For

App builders who want to let end users use their own AI subscriptionsPersonal projects and demos where cost is passed to the user's existing planPrototyping AI features without managing API keys or billing for users

FAQ

How does AuthAI work?
Users sign in with their ChatGPT, Grok, or Copilot account via OAuth. Your backend calls the relay with the user's JWT as the API key. The relay decrypts the user's tokens and forwards requests to the provider's API. Responses are returned using the standard OpenAI SDK format.
What providers are supported?
ChatGPT, Grok, and GitHub Copilot are currently supported. Each uses its own provider-specific device-code OAuth flow.
Is AuthAI free?
The hosted relay at authai.io is free (rate-limited) and runs the same code as the self-hosted version. Self-hosting is also free.
Can I use AuthAI in production?
The project is experimental and recommended for personal projects and demos only. It uses unofficial OAuth flows that providers can change.