{"id":22407866,"url":"https://github.com/openhacking/chatgpt-api-demo","last_synced_at":"2025-08-21T00:07:48.011Z","repository":{"id":129091537,"uuid":"609018485","full_name":"openHacking/ChatGPT-API-Demo","owner":"openHacking","description":"ChatGPT API Demo","archived":false,"fork":false,"pushed_at":"2023-03-03T07:51:11.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T01:48:37.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/openHacking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-03-03T07:49:05.000Z","updated_at":"2023-03-03T07:51:15.000Z","dependencies_parsed_at":"2023-04-19T11:52:02.720Z","dependency_job_id":null,"html_url":"https://github.com/openHacking/ChatGPT-API-Demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/openHacking/ChatGPT-API-Demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openHacking%2FChatGPT-API-Demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openHacking%2FChatGPT-API-Demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openHacking%2FChatGPT-API-Demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openHacking%2FChatGPT-API-Demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openHacking","download_url":"https://codeload.github.com/openHacking/ChatGPT-API-Demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openHacking%2FChatGPT-API-Demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271405572,"owners_count":24753799,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-05T11:15:38.470Z","updated_at":"2025-08-21T00:07:47.984Z","avatar_url":"https://github.com/openHacking.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatGPT API Demo\r\n\r\n## Installation\r\n\r\n1. Install dependencies\r\n```shell\r\npip install -r requirements.txt\r\n```\r\n\r\n2. Create a new `.env` file\r\nwrite API key\r\n```shell\r\nOPENAI_API_KEY = '[YOUR_API_KEY]'\r\n```\r\n\r\n## Usage\r\n\r\n### Use ChatGPT with Flask\r\nStart app\r\n```shell\r\npython -m flask --app app.py run\r\n```\r\n\r\nthen test\r\n\r\n```shell\r\ncurl --header \"Content-Type: application/json\" \\\r\n  --request POST \\\r\n  --data '{\"message\":\"Hello\"}' \\\r\n  http://127.0.0.1:5000/chat\r\n```\r\n\r\nMore detail: [Develop an Intelligent Chat Program Using Python and ChatGPT API](https://lwebapp.com/en/post/python-chatgpt-api)\r\n\r\n### Use ChatGPT API\r\n\r\n```shell\r\npy api.py\r\n```\r\n\r\nMore detail: [Python + ChatGPT API Development | Based on gpt-3.5-turbo model](https://lwebapp.com/en/post/chatgpt-api)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenhacking%2Fchatgpt-api-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenhacking%2Fchatgpt-api-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenhacking%2Fchatgpt-api-demo/lists"}