Aurora converts the ChatGPT Web backend into an OpenAI-style API, supporting chat, Responses, file-based Q&A, image generation, image variations, speech-to-text, text-to-speech, model listings, and obtaining a valid ChatGPT access_token via refresh_token / session_token.
For full endpoints, authentication, token exchange, and curl examples, see: API.md
-
OpenAI-style
/v1/chat/completionswith streaming and non-streaming support, including parameters such astemperature/top_p/max_tokens/stop/reasoning_effort/response_format/stream_options.include_usage. -
Tool Calling emulation — ChatGPT Web does not natively support function calling. Aurora emulates it via a
<tool_call>text protocol, supportingtools/tool_choicefields, automatically injecting the calling convention into the system prompt and parsing<tool_call>blocks in model output into standard OpenAI-formattool_calls. -
OpenAI-style
/v1/responseswith string input, message arrays,instructions, streaming events, and parameters such asreasoning.effort/text.query.format/temperature. -
/v1/filesfor file uploads; after uploading, you can includefile_idin chat or Responses requests for file-based Q&A. -
/v1/images/generationsfor image generation; the model list includesgpt-image-2, supports SSE streaming, and can return either URLs orb64_json. -
/v1/images/editsfor image editing and/v1/images/variationsfor image-to-image generation (variations). -
/v1/audio/speechfor text-to-speech (TTS), compatible with common OpenAI voices and output formats. -
/v1/audio/transcriptionsfor speech-to-text, supporting mp3/wav/m4a/ogg/flac/webm formats. -
/v1/audio/translationsfor audio translation into English. -
/v1/modelsfor model listing. -
/auth/refresh: pass an OpenAIrefresh_tokento obtain anaccess_token. -
/auth/session: pass a ChatGPTsession_tokento obtain a newsession_tokenandaccess_token. -
/backend-api/conversationfor direct proxying of raw ChatGPT conversation requests. -
Support for
access_tokens.txtaccount pool,free_tokens.txtfree UUID pool,refresh_tokens.txtOAuth refresh token pool,session_tokens.txtsession token pool, automatic free account generation, proxy pool, and TLS. -
Full account management: Each account has an independent TLS Client, proxy IP, browser fingerprint, and WSS connection. Supports 3 account types (TypeNoAuth / TypeFree / TypePUID) and 6 lifecycle states.
-
Token deduplication: Deduplicates accounts by parsing
chatgpt_account_idfrom the JWT payload — the same account won't occupy the pool twice even if multiple tokens are provided. -
Capability system: 10 capabilities (Chat / Responses / ToolCalling / ImageGenerate / ImageEdit / ImageVariation / TTS / Transcribe / FileUpload / WebSocket). Only chat/responses are accessible to noauth accounts; others require login.
-
Health check: Automatically renews expired
session_token/refresh_tokenaccounts every 10 minutes. -
External access_token support: When
ENABLE_EXTERNAL_TOKEN=true, accept externally provided ChatGPT access_tokens. Temporary isolated accounts (TLS Client + UA + proxy + fingerprint) are created and released after 10 minutes of inactivity.
git clone https://github.com/aurora-develop/aurora
cd aurora
go build -o aurora
chmod +x ./aurora
./auroradocker run -d \
--name aurora \
-p 8080:8080 \
-v $(pwd)/access_tokens.txt:/access_tokens.txt:ro \
ghcr.io/aurora-develop/aurora:latestPrepare
access_tokens.txtin the current directory (one access_token per line) and mount it into the container via-v. The same applies to other files:-v $(pwd)/free_tokens.txt:/free_tokens.txt:ro,-v $(pwd)/proxies.txt:/proxies.txt:ro.
mkdir aurora
cd aurora
# 1. Prepare access_tokens.txt (one token per line)
# 2. Place the docker-compose.yml from the repository into the current directory
# 3. docker-compose.yml already includes a ./access_tokens.txt mount; uncomment free_tokens.txt or proxies.txt as needed
docker-compose up -dNo additional configuration is required by default. You can configure via .env, system environment variables, or environment variables with the same name on your deployment platform:
# Server listen
SERVER_HOST=0.0.0.0
SERVER_PORT=8080
PORT=8080
# Authentication
Authorization=your_authorization
# Free accounts
FREE_ACCOUNTS=true
FREE_ACCOUNTS_NUM=1024
# HTTPS
TLS_CERT=path_to_your_tls_cert
TLS_KEY=path_to_your_tls_key
# Proxy
PROXY_URL=your_proxy_url
http_proxy=
# Reverse proxy for specific endpoints (optional)
API_REVERSE_PROXY=
FILES_REVERSE_PROXY=
# Custom BASE_URL (default https://chatgpt.com/backend-api)
BASE_URL=
# Stream mode (set to false to force non-streaming Chat Completions)
STREAM_MODE=true
# Preserve conversation history context (set to true to enable)
ENABLE_HISTORY=false
# Tool calling emulation
TOOL_CALLING_ENABLED=true
REFUSAL_RETRIES=3
# DEBUG_TOOL_LOG=tool_debug.log
# External access token (accept ChatGPT access_token from request header)
ENABLE_EXTERNAL_TOKEN=trueDetails:
SERVER_HOST/SERVER_PORT: Service listening address and port.PORTis a fallback forSERVER_PORT.Authorization: Service access key. When configured, requests must includeAuthorization: Bearer your_authorizationin the header.FREE_ACCOUNTS: Whether to automatically generate free UUID accounts; disabled by default.FREE_ACCOUNTS_NUM: Number of automatically generated free UUID accounts; default is 1024.TLS_CERT/TLS_KEY: When both are configured, HTTPS is enabled.PROXY_URL: Proxy pool address.http_proxyis the fallback proxy address.API_REVERSE_PROXY/FILES_REVERSE_PROXY: Configure separate forward proxies for/backend-api/*and/filesendpoints respectively; falls back to the default proxy when not set.BASE_URL: Custom upstream ChatGPT API base URL, defaults tohttps://chatgpt.com/backend-api.STREAM_MODE: Set tofalseto force non-streaming Chat Completions; defaults totrue.ENABLE_HISTORY: Set totrueto preserve conversation history context in requests.TOOL_CALLING_ENABLED: Set tofalseto ignore thetoolsfield in requests and disable tool calling emulation.REFUSAL_RETRIES: Maximum retry attempts when the model enters a "sandbox refusal" loop; defaults to3.ENABLE_EXTERNAL_TOKEN: When set totrue, accept externally provided ChatGPT access_tokens. A temporary account (with isolated TLS Client, UA, proxy, and browser fingerprint) is created per token, automatically released after 10 minutes of inactivity. Defaulttrue.DEBUG_TOOL_LOG: Set to a file path to write detailed trace logs for each tool call parsing (for debugging).
Local account files:
access_tokens.txt: One ChatGPTaccess_tokenper line, used for features that require a logged-in account.free_tokens.txt: One UUID device ID per line, serving as a free account pool.refresh_tokens.txt: One OpenAIrefresh_tokenper line (supportstoken:team_idformat). Automatically exchanged for anaccess_tokenon startup; auto-renewed on expiry.session_tokens.txt: One ChatGPTsession_tokenper line (supportstoken:team_idformat). Automatically exchanged for anaccess_tokenon startup; auto-renewed on expiry.proxies.txt: One proxy URL per line (port required). Forms a proxy pool withPROXY_URL.
Thanks to all the contributors for their PR support.
MIT License