{"id":14369994,"url":"https://github.com/dairoot/chatgpt-mirror","last_synced_at":"2026-01-21T14:38:40.283Z","repository":{"id":243208681,"uuid":"811772887","full_name":"dairoot/ChatGPT-Mirror","owner":"dairoot","description":"🚀 一键部署个人的 ChatGPT 镜像站","archived":false,"fork":false,"pushed_at":"2024-10-21T08:10:57.000Z","size":626,"stargazers_count":397,"open_issues_count":2,"forks_count":74,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-21T23:17:18.185Z","etag":null,"topics":["chatapi","chatgpt","chatgpt-api","chatgpt-plus","chatgpt-share"],"latest_commit_sha":null,"homepage":"https://chatgpt.dairoot.cn","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dairoot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-07T09:15:57.000Z","updated_at":"2024-10-21T18:25:24.000Z","dependencies_parsed_at":"2024-08-19T02:58:30.796Z","dependency_job_id":"b7b99107-674f-40f0-ac90-31d74c9f258f","html_url":"https://github.com/dairoot/ChatGPT-Mirror","commit_stats":null,"previous_names":["dairoot/chatgpt-mirror"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dairoot%2FChatGPT-Mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dairoot%2FChatGPT-Mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dairoot%2FChatGPT-Mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dairoot%2FChatGPT-Mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dairoot","download_url":"https://codeload.github.com/dairoot/ChatGPT-Mirror/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230598636,"owners_count":18251216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatapi","chatgpt","chatgpt-api","chatgpt-plus","chatgpt-share"],"created_at":"2024-08-27T22:01:21.261Z","updated_at":"2026-01-21T14:38:40.277Z","avatar_url":"https://github.com/dairoot.png","language":"Shell","funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eChatGPT Mirror\u003c/h1\u003e\n\n[![Docker](https://img.shields.io/docker/pulls/dairoot/chatgpt-mirror?label=ChatGPT-Mirror\u0026logo=docker)](https://hub.docker.com/r/dairoot/chatgpt-mirror)\n[![License](https://img.shields.io/github/license/dairoot/ChatGPT-Mirror)](https://github.com/dairoot/ChatGPT-Mirror/blob/main/LICENSE)\n\nChatGPT Mirror 后台是一个 ChatGPT 镜像站，允许多账号共享管理。实现多人同时使用 ChatGPT 服务。\n\n## 特点\n\n- 提供与官网同等的极致体验。\n- 提供 ChatGPT 聊天接口 转 API `/v1/chat/completions`\n- 用户无需翻墙，便可轻松访问并使用 ChatGPT 官方网站的所有功能。\n- 通过在 `Mirror` 后台录入 `ChatGPT Token`，让团队成员每人拥有独立账号 (或共享同一个`ChatGPT Plus`账号)。\n- 提供便捷的管理后台，帮助管理员高效管理账号。\n\n## 在线体验\n\nhttps://chatgpt.dairoot.cn\n\n## 部署\n\n为了获得最佳体验，请先观看以下视频教程\n\nhttps://github.com/user-attachments/assets/7b868672-cfaf-430c-9ec4-f1617a428225\n\n\u003c!--\n\u003ca href=\"https://www.bilibili.com/video/BV1fD421M7xP/\" target=\"_blank\"\u003e\n  \u003cimg src=\"./docs/img/cover.jpeg\"  alt=\"使用方法\"\u003e\n\u003c/a\u003e\n--\u003e\n\n打开命令行终端，执行以下命令\n\n```bash\n# 切换到 home 目录，并克隆 ChatGPT-Mirror 仓库\ncd /home/ \u0026\u0026 git clone https://github.com/dairoot/ChatGPT-Mirror.git\n\ncd ChatGPT-Mirror/\n\n# 修改管理后台账号密码\ncp .env.example .env \u0026\u0026 vi .env\n\n# 启动\n./deploy.sh\n\n```\n访问 http://127.0.0.1:50002 或访问 http://外网ip:50002\n\n\n配置域名，请点击查看[完整部署流程](./docs/deploy.md)\n\n\n## 环境变量\n\n\u003ctable\u003e\n  \u003ctr align=\"left\"\u003e\n    \u003cth\u003e分类\u003c/th\u003e\n    \u003cth\u003e变量名\u003c/th\u003e\n    \u003cth\u003e类型\u003c/th\u003e\n    \u003cth\u003e默认值\u003c/th\u003e\n    \u003cth\u003e描述\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr align=\"left\"\u003e\n    \u003ctd rowspan=\"4\"\u003e镜像后台\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eADMIN_USERNAME\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eString\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eNone\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e管理后台账号\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr align=\"left\"\u003e\n    \u003ctd\u003e\u003ccode\u003eADMIN_PASSWORD\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eString\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eNone\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e管理后台密码\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr align=\"left\"\u003e\n    \u003ctd\u003e\u003ccode\u003eALLOW_REGISTER\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eBoolean\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003etrue\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e是否允许注册\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr align=\"left\"\u003e\n    \u003ctd\u003e\u003ccode\u003eWEB_HATD\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eBoolean\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003efalse\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eWEB 开启临时聊天（不保存聊天记录）\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr align=\"left\"\u003e\n    \u003ctd rowspan=\"3\"\u003eAPI 相关\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eENABLE_MIRROR_API\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eBoolean\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003etrue\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e是否开启 API 访问\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr align=\"left\"\u003e\n    \u003ctd\u003e\u003ccode\u003eMIRROR_API_PREFIX\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eString\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eNone\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eAPI 访问前缀，建议配置\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr align=\"left\"\u003e\n    \u003ctd\u003e\u003ccode\u003eAPI_HATD\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eBoolean\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003efalse\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eAPI 开启临时聊天（不保存聊天记录）\u003c/td\u003e\n  \u003c/tr\u003e\n   \u003ctr align=\"left\"\u003e\n    \u003ctd rowspan=\"3\"\u003e系统变量\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003ePROXY_URL_POOL\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eString\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eNone\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e代理池链接，多个代理用逗号分隔\u003cbr\u003e\u003ccode\u003ehttp://username:password@ip:port,\u003c/code\u003e\u003cbr/\u003e\u003ccode\u003esocks5://username:password@ip:port,\u003c/code\u003e\u003cbr/\u003e\u003ccode\u003esocks5h://username:password@ip:port\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n    \u003ctr align=\"left\"\u003e\n    \u003ctd\u003e\u003ccode\u003eVOICE_PROXY_URL\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eString\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eNone\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e语音代理地址 \u003ca href=\"./docs/livekit.md\"\u003e点击自建\u003c/a\u003e\u003cbr\u003e若不配置，则用户需要翻墙才能使用语音功能\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n# 聊天 API 接口\n\n可搭配 [ChatGPT-Next-Web](https://app.nextchat.dev)、[Lobe-Chat](https://github.com/lobehub/lobe-chat) 使用\n```\naccessToken 获取地址：https://chatgpt.com/api/auth/session\n\nAPI 地址为：https://你的地址\n```\n\n聊天接口请求示例：\n\n```bash\nexport accessToken=XXXXX  # 获取地址：https://chatgpt.com/api/auth/session\nexport yourUrl=http://127.0.0.1:50002\n\n\ncurl --location \"${yourUrl}/v1/chat/completions\" \\\n--header 'Content-Type: application/json' \\\n--header \"Authorization: Bearer ${accessToken}\" \\\n--data '{\n     \"model\": \"gpt-4o-mini\",\n     \"messages\": [{\"role\": \"user\", \"content\": \"你好呀!\"}],\n     \"stream\": true,\n     \"conversation_id\": null,\n     \"parent_message_id\": null,\n     \"hatd\": false\n   }'\n```\n\n更多 API 请点击查看：[高阶玩法](./docs/chatapi-gateway.md)\n\n## FQA\n\n[简体中文 \u003e 常见问题](./docs/faq-cn.md)\n\n## 捐赠\n\n[Buy Me a Coffee](./docs/donation.md)\n\n## Star History\n\n![Star History Chart](https://api.star-history.com/svg?repos=dairoot/ChatGPT-Mirror\u0026type=Timeline)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdairoot%2Fchatgpt-mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdairoot%2Fchatgpt-mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdairoot%2Fchatgpt-mirror/lists"}