What is this?
A reverse proxy that turns China's government 'National Anti-Fraud AI' (国家反诈AI) mobile assistant into an OpenAI-compatible API (/v1/chat/completions), so it can be plugged into normal AI chat clients.
Is this a standalone server I run, or a library I import?
It's a standalone Python server process you run yourself; it exposes OpenAI-style HTTP endpoints and forwards the calls to the anti-fraud AI backend using your extracted login token.
How do I get it running?
Install the Python 3.9+ dependencies, copy the .env template and fill in your Access/Refresh Token, then start the service - it serves OpenAI-compatible routes like /v1/chat/completions and /v1/models.
Do I need an account or token from the actual app first?
Yes - you need a valid Access Token (ideally with a Refresh Token) from the official '国家反诈AI' app's JWT login, which you extract via ADB, Chrome webview debugging, or a packet-capture tool like Fiddler/Charles/Reqable.
Is this officially supported, or could it break anytime?
It's unofficial and explicitly disclaims any affiliation with the real app; the author states it's only for technical exchange, academic research and personal learning, and since it relies on reverse-engineered tokens, the extraction methods could stop working if the app changes.
Does it run only on Linux, or on Windows and macOS too?
It runs cross-platform - the README gives separate setup commands for PowerShell on Windows and Bash/Zsh on Linux/macOS.
How long does the access token stay valid before I need to re-login?
With a Refresh Token configured, the service auto-renews the session for up to about 90 days without needing to log in again.
Which chat clients can I point at this proxy?
It's built to work out of the box with NextChat, OneAPI/New API, LobeChat, Codex CLI, or any other tool that speaks the OpenAI chat-completions API.
What is the '国家反诈AI' app this project proxies?
It's China's official 'National Anti-Fraud AI' mobile app, built on the Uni-App framework, which stores its login session in a local SQLite database on the phone.
Does streaming output actually work correctly?
Yes - SSE streaming was specifically fixed to send the first chunk's role, incremental delta content, and a proper finish_reason: stop signal.
What are similar projects?
gpt4free, pansou, -AI-, claude-relay-service, opencode2api, TradingAgents-CN, qoder-workflow, workbuddy2api-panel
Which topics is it in?
sse, openai-api, jwt, python3, reverse-proxy, reverse-engineering, authentication, chatbot, proxy, china, rest-api, backend