{"id":19988561,"url":"https://github.com/mapluisch/chatgpt-without-login","last_synced_at":"2025-09-16T16:27:40.147Z","repository":{"id":231087204,"uuid":"780868046","full_name":"mapluisch/ChatGPT-without-login","owner":"mapluisch","description":"Scripts in various languages to use ChatGPT without login, registration, or API access.","archived":false,"fork":false,"pushed_at":"2024-06-28T20:20:49.000Z","size":55,"stargazers_count":45,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-08T06:29:09.613Z","etag":null,"topics":["chatgpt","chatgpt-api","chatgpt-app","chatgpt-free","chatgpt-instant-access","chatgpt-node","chatgpt-python","chatgpt35-turbo","headless","nodejs","nodejs-chatgpt","nodejs-openai","nodejs-openai-api","openai","openai-chatgpt","openai-python","puppeteer","pyppeteer","python3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mapluisch.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-04-02T10:05:54.000Z","updated_at":"2025-04-03T18:08:07.000Z","dependencies_parsed_at":"2024-04-07T12:24:54.008Z","dependency_job_id":"d1f1770d-aadd-4a56-ade5-1a549aa6d404","html_url":"https://github.com/mapluisch/ChatGPT-without-login","commit_stats":null,"previous_names":["mapluisch/headless-chatgpt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapluisch%2FChatGPT-without-login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapluisch%2FChatGPT-without-login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapluisch%2FChatGPT-without-login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapluisch%2FChatGPT-without-login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapluisch","download_url":"https://codeload.github.com/mapluisch/ChatGPT-without-login/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252308200,"owners_count":21727140,"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":["chatgpt","chatgpt-api","chatgpt-app","chatgpt-free","chatgpt-instant-access","chatgpt-node","chatgpt-python","chatgpt35-turbo","headless","nodejs","nodejs-chatgpt","nodejs-openai","nodejs-openai-api","openai","openai-chatgpt","openai-python","puppeteer","pyppeteer","python3"],"created_at":"2024-11-13T04:43:24.912Z","updated_at":"2025-09-16T16:27:35.090Z","avatar_url":"https://github.com/mapluisch.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eScripts for using ChatGPT without login\u003c/h1\u003e\n  \u003cimg src=\"https://martinpluisch.com/chatgpt-without-login\"\u003e\n  \u003cp align=\"center\"\u003e\u003cem\u003eExample for accessing ChatGPT (3.5) without an account or API access via Python. Only for educational purposes.\u003c/em\u003e\u003c/p\u003e\n\u003c/div\u003e\n\u003chr\u003e\n\n\n## Heads-up\n[OpenAI just announced instant access to ChatGPT 3.5 without signing up](https://openai.com/blog/start-using-chatgpt-instantly); this repo contains scripts in multiple programming languages for programmatic instant access, i.e., headless chats with ChatGPT via https://chat.openai.com (without signing up or requiring API keys).\n\nInstant access is currently rolling out and (based on some quick tests of mine) is **currently only available in the US and Canada (IP-based)**.\n\n## Supported Languages (more to come)\n\n- Python\n- JavaScript (Node.js)\n\n## Python\n\n### Setup / Dependencies\nGrab the `gpt.py` script from within the `python` directory.\n\nThe script relies on `playwright`, a headless browser library.\n\nInstall it first using `pip install playwright` (or `pip3`, depending on your setup).\n\n### Usage\n\n#### Calling it from your own script\nWith my `gpt.py` in the same directory, you can call it using some prompt using this example (`test_implementation.py`):\n```python\nimport asyncio\nfrom gpt import GPT\n\nasync def run_session():\n    # create gpt instance \u0026 send initial prompt\n    session = GPT(prompt=\"Tell me a joke.\", streaming=True)\n    \n    await session.start() \n    \n    # (optional) send additional prompts and handle them\n    print(\"\\n -- asking GPT to explain the joke -- \\n\")\n    await session.handle_prompt(\"Explain the joke.\")\n\n    # gracefully close the session again\n    await session.close()\n\nasyncio.run(run_session())\n```\n\nThe first prompt of a *new* session always takes a bit longer, as the headless browser has to init. Subsequent prompts are handled as fast as you'd expect it from the typical GPT browser UI.\n\n#### CLI Arguments\nYou can also chat with GPT using CLI; just call `python3 gpt.py` with the following args (all of them are optional):\n\n- `-p`, `--prompt`\n  - the initial prompt text to send to ChatGPT.\n  - **type**: `str`\n  - **default**: \"Hello, GPT\"\n  \n- `-ns`, `--no-streaming`\n  - if true, the script doesn't print GPT's response in chunks (\"streaming\"-esque), but rather waits until it is fully typed out before printing it.\n  - **type**: bool (`store_true`)\n  - **default**: false\n\n - `-x`, `--proxy`\n   - the proxy server to use, e.g., `http://proxyserver:port`.\n   - **type**: `str`\n   - **default**: None\n  \n - `-st`, `--session-token`\n   - your `__Secure-next-auth.session-token` in order to use your OpenAI account (i.e. to minimize rate limiting, use 4o, etc.)\n   - **type**: `str`\n   - **default**: None  \n\n\nYou can start a streaming-based conversation with `python3 gpt.py`.\n\n## Node.js\n\n### Setup / Dependencies\nGrab the `gpt.js` script from within the `nodejs` directory.\n\nThe Node.js script relies on `playwright`, a headless browser library, and `commander`.\n\nInstall both using `npm install playwright commander`.\n\n### Usage\n\n#### Calling it from your own script\nWith `gpt.js` in the same directory, you can call it using some prompt using this example (`test_implementation.js`):\n```javascript\nconst { GPT } = require('./gpt.js');\n\n(async () =\u003e {\n    try {\n        // create gpt instance \u0026 send initial prompt\n        const gptSession = new GPT(\"Tell me a joke.\", true);\n\n        await gptSession.start();\n        \n        // (optional) send additional prompts and handle them\n        console.log(\"\\n -- asking GPT to explain the joke -- \\n\")\n        await gptSession.handlePrompt(\"Explain the joke.\");\n\n        // gracefully close the session again\n        await gptSession.close();\n    } catch (error) {\n        console.error(\"Error in GPT session:\", error);\n    }\n})();\n```\n\nThe first prompt of a *new* session always takes a bit longer, as the headless browser has to init. Subsequent prompts are handled as fast as you know it from the typical GPT browser UI.\n\n#### CLI Arguments\nYou can also chat with GPT using Node CLI; call `node gpt.js` with the following args:\n\n- `-p`, `--prompt`\n  - the initial prompt text to send to ChatGPT.\n  - **type**: `str`\n  - **default**: \"Hello, GPT\"\n  \n- `-ns`, `--no-streaming`\n  - if true, the script doesn't print GPT's response in chunks (\"streaming\"-esque), but rather waits until it is fully typed out before printing it.\n  - **type**: bool (`store_true`)\n  - **default**: false\n \n- `-x`, `--proxy`\n   - the proxy server to use, e.g., `http://proxyserver:port`.\n   - **type**: `str`\n   - **default**: None\n \n - `-st`, `--session-token`\n   - your `__Secure-next-auth.session-token` in order to use your OpenAI account (i.e. to minimize rate limiting, use 4o, etc.)\n   - **type**: `str`\n   - **default**: None  \n\nYou can start a streaming-based conversation with `node gpt.js`.\n\n## ToDo\n- [x] support response streaming\n- [x] support conversations\n- [ ] support different output formats (with / without IDs, json, prettify...)\n\n\n### Disclaimer\n*This project is only meant for educational purposes. Please use OpenAI's API for requests.*\n\nAlso, this is a barebones example and still WIP - if you find issues / bugs, please report them 😊\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapluisch%2Fchatgpt-without-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapluisch%2Fchatgpt-without-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapluisch%2Fchatgpt-without-login/lists"}