Skip to content

financialvice/chatfaucet

Repository files navigation

Chat Faucet

Chat Faucet — your ChatGPT plan exposed as an OpenAI Responses API

what it do

  • gives you a more OPENAI_API_KEY-like experience by managing your codex auth creds and letting you mint your own api keys to use against the chatfaucet.com/v1 base url
  • also runs requests through a thin Fly proxy bc I had trouble with making requests from Cloudflare IPs when building on their infra
  • TL;DR: your ChatGPT plan -> OpenAI Responses API

why

  • your ChatGPT subscription includes Responses API usage (primarily intended for consumption in Codex CLI and App), but approved for usage elsewhere by OAI staff
  • the standard use case for this auth method (codex exec or codex app-server) is relatively un-ergonomic for more standard, simple AI app implementations (like basic chat or non-computer-using agents)
  • chat faucet makes it stupid easy to build and deploy apps that use your ChatGPT sub inference

quirks

  • must set instructions, store: false, stream: true (see docs)
  • probably other quirks, if you find please PR

developer apps

  • create a developer app in the dashboard to let your users bring their own ChatGPT account for inference
  • your backend starts a connect session and gets a ChatGPT device code plus an OpenAI auth URL
  • your app should show the device code first, then offer a "Continue to ChatGPT" button; do not immediately redirect users away before they can see the code
  • your backend polls Chat Faucet for a connection_id; users never need to see or think about Chat Faucet
  • your backend calls /v1/responses with Authorization: Bearer chf_app_... and ChatFaucet-Connection: conn_...
  • see examples/developer-app-fixture.mjs for a tiny runnable integration test

privacy and security

  • to make things easy, this service stores encrypted ChatGPT OAuth tokens from the browser sign-in flow and auto-refreshes them for gateway requests
  • please fork, deploy for yourself (just need Cloudflare/Fly.io), or ask your agent to do things your way

inspiration / references

  • OpenAI Codex; direct reference source code for reverse-engineering
  • Pi, OpenCode, OpenClaw; they use similar approaches for enabling ChatGPT sub usage for their agent harnesses

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors