{"id":14970862,"url":"https://github.com/nicepkg/poe2gpt","last_synced_at":"2025-10-06T08:32:12.462Z","repository":{"id":253478249,"uuid":"843641611","full_name":"nicepkg/poe2gpt","owner":"nicepkg","description":"Unimpeded: Convert Poe.com to OpenAI Interface-Compatible Format! 🔑 畅通无阻: 将 Poe.com 转换为 OpenAI 接口兼容格式!","archived":false,"fork":false,"pushed_at":"2024-08-17T03:02:08.000Z","size":667,"stargazers_count":14,"open_issues_count":3,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-16T20:22:04.355Z","etag":null,"topics":["ai","anthropic","chatgpt","claude","cli","command-line-tool","gemini","llm","openai","peo-api","poe","poe-openai-proxy","poe-proxy","poe-to-gpt","poe-to-openai","poe2gpt","tools"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicepkg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":["nicepkg",2214962083],"open_collective":"nicepkg"}},"created_at":"2024-08-17T01:43:13.000Z","updated_at":"2025-01-09T06:10:58.000Z","dependencies_parsed_at":"2024-08-17T02:35:51.407Z","dependency_job_id":null,"html_url":"https://github.com/nicepkg/poe2gpt","commit_stats":null,"previous_names":["nicepkg/poe2gpt"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicepkg%2Fpoe2gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicepkg%2Fpoe2gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicepkg%2Fpoe2gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicepkg%2Fpoe2gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicepkg","download_url":"https://codeload.github.com/nicepkg/poe2gpt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234856234,"owners_count":18897404,"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":["ai","anthropic","chatgpt","claude","cli","command-line-tool","gemini","llm","openai","peo-api","poe","poe-openai-proxy","poe-proxy","poe-to-gpt","poe-to-openai","poe2gpt","tools"],"created_at":"2024-09-24T13:44:15.378Z","updated_at":"2025-10-06T08:32:07.157Z","avatar_url":"https://github.com/nicepkg.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n\u003ch1\u003epoe2gpt\u003c/h1\u003e\n\nEnglish / [简体中文](https://github.com/nicepkg/poe2gpt/tree/master/README_CN.md)\n\n🔑 Unimpeded: Convert Poe.com to OpenAI Interface-Compatible Format!\n\n🔑 畅通无阻: 将 Poe.com 转换为 OpenAI 接口兼容格式!\n\n[![Version](https://img.shields.io/npm/v/poe2gpt)](https://www.npmjs.com/package/poe2gpt)\n[![Downloads](https://img.shields.io/npm/dm/poe2gpt)](https://www.npmjs.com/package/poe2gpt)\n[![License](https://img.shields.io/github/license/nicepkg/poe2gpt)](https://github.com/nicepkg/poe2gpt/blob/master/LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/nicepkg/poe2gpt)](https://github.com/nicepkg/poe2gpt)\n\n\u003c/div\u003e\n\n## Why 📚\n\nPoe's subscription credits often go unused, but using other tools requires additional payments to OpenAI, which feels like a waste. So, I wondered if Poe could be forwarded to an OpenAI-compatible API.\n\nI searched on GitHub and found some similar projects, but they were either no longer maintained or not very user-friendly. So, I decided to optimize and port it myself.\n\npoe2gpt is ported from the [poe-to-gpt](https://github.com/formzs/poe-to-gpt) and [fastapi_poe](https://github.com/poe-platform/fastapi_poe) projects. Thanks to them.\n\nWith poe2gpt, all you need is a nodejs environment, and you can start it with a single command—very convenient.\n\n\u003e \\[!IMPORTANT]\\\n\u003e Currently, **only Poe subscribers can access the API key**.\n\u003e Poe subscribers can obtain the API key at: [https://poe.com/api_key](https://poe.com/api_key)\n\n## Usage 📦\n\n### Command-line Usage\n\nFirst, you need to install [Node.js](https://nodejs.org/) on your system. Once installed, you can start `poe2gpt` in two ways.\n\n#### Method 1: Using npx\n\nYou can run it directly using `npx`, which comes with nodejs:\n\n```sh\nnpx poe2gpt -t \u003ctokens\u003e -p \u003cport\u003e -sk \u003caccessTokens\u003e -r \u003crateLimit\u003e -c \u003ccoolDown\u003e -o \u003ctimeout\u003e -b \u003cbot\u003e\n\n# Example\nnpx poe2gpt -t \"your poe key\"\n```\n\n#### Method 2: Using Local Installation\n\nIf you want a faster startup in the future, you can install it globally:\n\n```sh\nnpm i -g poe2gpt\n```\n\nThen you can start it with the following command:\n\n```sh\npoe2gpt -t \u003ctokens\u003e -p \u003cport\u003e -sk \u003caccessTokens\u003e -r \u003crateLimit\u003e -c \u003ccoolDown\u003e -o \u003ctimeout\u003e -b \u003cbot\u003e\n\n# Example\npoe2gpt -t \"your poe key\"\n```\n\n#### Parameter Explanation\n\n| Parameter            | Description                                                                                 | Default |\n| -------------------- | ------------------------------------------------------------------------------------------- | ------- |\n| -t, --tokens         | List of POE tokens, multiple can be separated by commas. Reference: https://poe.com/api_key |         |\n| -p, --port           | Port number                                                                                 | 3700    |\n| -sk, --access-tokens | Custom API access token whitelist, separated by commas                                      |         |\n| -r, --rate-limit     | Request limit per minute                                                                    | 60      |\n| -c, --cool-down      | Cooldown time (seconds)                                                                     | 3       |\n| -o, --timeout        | Timeout for each response block (seconds)                                                   | 180     |\n| -b, --bot            | JSON string mapping bot names                                                               |         |\n| -v, --version        | Show version number                                                                         |         |\n| --help               | Show help information                                                                       |         |\n\nMulti-parameter example:\n\n```sh\npoe2gpt -t \"your poe key\" -p 3700 -sk \"your custom API access token whitelist\" -r 60 -c 3 -o 180 -b '{\"gpt-4o\": \"GPT-4o\"}'\n```\n\n### Using Source Code\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see how to use the source code\u003c/summary\u003e\n\nClone this repository to your local machine:\n\n```sh\ngit clone https://github.com/nicepkg/poe2gpt.git\ncd poe2gpt/\n```\n\nInstall dependencies:\n\n```sh\nnpm install\n```\n\nCreate a configuration file in the project’s root directory. Instructions are written in the comments:\n\n```sh\ncp config.example.toml config.toml\n# Then configure config.toml\n```\n\nStart the Node.js backend:\n\n```sh\nnpm run dev\n```\n\n\u003c/details\u003e\n\n## Configuration 🛠\n\nPlease refer to the [OpenAI documentation](https://platform.openai.com/docs/api-reference/chat/create) for more details on how to use the ChatGPT API.\n\nSimply replace `https://api.openai.com` with `http://localhost:3700` in your code to start using it.\n\n\u003e \\[!NOTE]\n\u003e\n\u003e The `accessTokens` you set will be used as the OpenAI Key for authentication. If not set, no authentication is required.\n\nSupported routes:\n\n- /models\n- /chat/completions\n- /v1/models\n- /v1/chat/completions\n\nSupported parameters:\n\n| Parameter | Note                                                                                            |\n| --------- | ----------------------------------------------------------------------------------------------- |\n| model     | Refer to the `[bot]` section in `config.example.toml` for model name mappings to bot nicknames. |\n| messages  | You can use this parameter as in the official API, except for `name`.                           |\n| stream    | You can use this parameter as in the official API.                                              |\n\nOther parameters will be ignored.\n\n**Successfully tested in [Aide](https://github.com/nicepkg/aide) / [Chatbox](https://github.com/Bin-Huang/chatbox) / [Lobe-chat](https://github.com/lobehub/lobe-chat).**\n\n\u003e \\[!NOTE]\n\u003e\n\u003e This forwarding does not support `tools_call` or `function_call`, so it can only be used for chatting or basic functions.\n\n### Configuration Example\n\n\u003cdetails\u003e\n\u003csummary\u003e config.toml Example \u003c/summary\u003e\n\n```toml\n# Port number for the proxy service. The proxied OpenAI API endpoint will be: http://localhost:3700/v1/chat/completions\nport = 3700\n\n# If you are a Poe subscriber, you can find the API key on the Poe website. You must be a Poe subscriber.\ntokens = [\"\"]\n\n# Custom API access keys\naccessTokens = [\"sk-R6phF8lDbv4oFHdaEN8UFeD5569d4b248aBb87F16b597479\"]\n\n# Enable or disable role simulation prompts. If you are using tools like https://github.com/TheR1D/shell_gpt, it is best to disable it.\n# 0: Disable, 1: Enable, 2: Auto-detect\n# Example:\n# ||\u003eUser:\n# Hello!\n# ||Assistant:\n# Hello! How can I assist you today?\nsimulateRoles = 2\n\n# Rate limit. Default is 60 API calls per minute per token\nrateLimit = 60\n\n# Cooldown time (seconds). The same token cannot be used multiple times within n seconds\ncoolDown = 3\n\n# Timeout for each response block (seconds)\n# This timeout resets with each received block,\n# so there is no need to compensate for very long replies with a very large value\ntimeout = 180\n\n# Bot name mappings from Poe\n[bot]\n\"gpt-3.5-turbo-16k\" = \"ChatGPT-16k\"\n\"gpt-3.5-turbo\" = \"ChatGPT-16k\"\n\"gpt-4\" = \"GPT-4\"\n\"gpt-4o\" = \"GPT-4o\"\n\"gpt-4o-mini\" = \"GPT-4o-Mini\"\n\"gpt-4-vision-preview\" = \"GPT-4-128k\"\n\"gpt-4-turbo-preview\" = \"Claude-3-Opus\"\n\"Llama-3.1-405B-T\" = \"Llama-3.1-405B-T\"\n\"Llama-3.1-405B-FW-128k\" = \"Llama-3.1-405B-FW-128k\"\n\"Llama-3.1-70B-T\" = \"Llama-3.1-70B-T\"\n\"Llama-3.1-70B-FW-128k\" = \"Llama-3.1-70B-FW-128k\"\n\"Claude-3.5-Sonnet\" = \"Claude-3.5-Sonnet\"\n\"Claude-3-Sonnet\" = \"Claude-3-Sonnet\"\n\"Claude-3-Haiku\" = \"Claude-3-Haiku\"\n\"Llama-3-70b-Groq\" = \"Llama-3-70b-Groq\"\n\"Gemini-1.5-Pro\"=\"Gemini-1.5-Pro\"\n\"Gemini-1.5-Pro-128k\"=\"Gemini-1.5-Pro-128k\"\n\"Gemini-1\n\n.5-Pro-1M\"=\"Gemini-1.5-Pro-1M\"\n\"DALL-E-3\"=\"DALL-E-3\"\n\"StableDiffusionXL\"=\"StableDiffusionXL\"\n```\n\n\u003c/details\u003e\n\n## Changelog 📅\n\nSee the latest updates and features: [Changelog](https://github.com/nicepkg/poe2gpt/blob/master/CHANGELOG.md)\n\n## Contribution 🤝\n\nContributions are welcome! Feel free to submit a pull request. For more details, see the [Contributing Guide](https://github.com/nicepkg/poe2gpt/blob/master/CONTRIBUTING.md).\n\nThis project exists thanks to all the contributors:\n\n\u003ca href=\"https://github.com/nicepkg/poe2gpt/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=nicepkg/poe2gpt\" /\u003e\n\u003c/a\u003e\n\n## License 📄\n\nThis project is licensed under the MIT License—see the [LICENSE](https://github.com/nicepkg/poe2gpt/blob/master/LICENSE) file for details.\n\n## Support 💖\n\nIf you find this project helpful, please consider giving it a ⭐️ on [GitHub](https://github.com/nicepkg/poe2gpt)!\n\n## Star History ⭐\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://api.star-history.com/svg?repos=nicepkg/poe2gpt\u0026type=Date\" width=\"600\" height=\"400\" alt=\"Star History Chart\" valign=\"middle\"\u003e\n\n\u003c/div\u003e\n","funding_links":["https://github.com/sponsors/nicepkg","https://github.com/sponsors/2214962083","https://opencollective.com/nicepkg"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicepkg%2Fpoe2gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicepkg%2Fpoe2gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicepkg%2Fpoe2gpt/lists"}