{"id":19222641,"url":"https://github.com/prioritz/chatgpt-api","last_synced_at":"2025-05-13T10:46:05.429Z","repository":{"id":64599938,"uuid":"576819039","full_name":"Prioritz/chatgpt-api","owner":"Prioritz","description":"Wrapper around ChatGPT API to consume it in 3rd party applications","archived":false,"fork":false,"pushed_at":"2022-12-14T07:57:22.000Z","size":15,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T23:32:38.356Z","etag":null,"topics":["chatgpt","chatgpt-api","chatgpt-api-wrapper","nodejs","openai-api","openapi","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Prioritz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-11T04:28:58.000Z","updated_at":"2023-10-16T07:10:51.000Z","dependencies_parsed_at":"2022-12-18T05:18:29.354Z","dependency_job_id":null,"html_url":"https://github.com/Prioritz/chatgpt-api","commit_stats":null,"previous_names":["rajeshberwal/chatgpt-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prioritz%2Fchatgpt-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prioritz%2Fchatgpt-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prioritz%2Fchatgpt-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prioritz%2Fchatgpt-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Prioritz","download_url":"https://codeload.github.com/Prioritz/chatgpt-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253927817,"owners_count":21985733,"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-api-wrapper","nodejs","openai-api","openapi","typescript"],"created_at":"2024-11-09T15:05:03.171Z","updated_at":"2025-05-13T10:46:05.409Z","avatar_url":"https://github.com/Prioritz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatGPT API\n\nA wrapper for the ChatGPT API to consume it for 3rd party applications. This is a work in progress and is not yet ready for production use.\n\n## Installation\n\n```bash\nnpm install gptchat\n```\n\n## Usage\n\n```js\nimport { ChatGPTApi } from \"gptchat\";\nimport * as dotenv from \"dotenv\";\n\ndotenv.config();\n\nconst api = new ChatGPTApi(process.env.COOKIE);\n\nasync function main() {\n  const response = await api.response(\"what is the weather like today?\");\n  console.log(response);\n}\n\nmain();\n```\n\nResult:\n\n```\nI'm sorry, but I am not able to access current weather information because I am a large language model trained by OpenAI and do not have access to the internet. I am only able to provide information based on the text that I was trained on, which has a knowledge cutoff of 2021. Is there something else I can help you with?\n```\n\nTo get a cookie login to [ChatGPT](\u003c(https://chat.openai.com/)\u003e) and copy the cookie from the request header from network tab.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprioritz%2Fchatgpt-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprioritz%2Fchatgpt-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprioritz%2Fchatgpt-api/lists"}