{"id":22003733,"url":"https://github.com/danitechid/chatgpt-api","last_synced_at":"2025-05-05T16:45:50.845Z","repository":{"id":206608235,"uuid":"717298185","full_name":"danitechid/chatgpt-api","owner":"danitechid","description":"ChatGPT API - TypeScript/JavaScript. ChatGPT API ini ditenagai oleh: https://daniapi.biz.id","archived":false,"fork":false,"pushed_at":"2023-11-15T14:40:02.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T07:41:02.522Z","etag":null,"topics":["chatgpt-api","openai","openai-api"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@danitech/chatgpt-api","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/danitechid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-11T03:28:01.000Z","updated_at":"2024-09-17T23:08:02.000Z","dependencies_parsed_at":"2023-11-15T15:48:59.799Z","dependency_job_id":null,"html_url":"https://github.com/danitechid/chatgpt-api","commit_stats":null,"previous_names":["danitechid/chatgpt-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danitechid%2Fchatgpt-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danitechid%2Fchatgpt-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danitechid%2Fchatgpt-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danitechid%2Fchatgpt-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danitechid","download_url":"https://codeload.github.com/danitechid/chatgpt-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252535675,"owners_count":21763989,"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-api","openai","openai-api"],"created_at":"2024-11-30T00:10:36.643Z","updated_at":"2025-05-05T16:45:50.829Z","avatar_url":"https://github.com/danitechid.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatGPT API - TypeScript/JavaScript\r\nChatGPT API ini ditenagai oleh: \u003ca href=\"https://daniapi.biz.id\"\u003edaniapi.biz.id\u003c/a\u003e\r\n\r\n## Instalasi\r\n### Menggunakan Npm\r\n```bash\r\nnpm i @danitech/chatgpt-api\r\n```\r\n\r\n### Atau Menggunakan Yarn\r\n```bash\r\nyarn add @danitech/chatgpt-api\r\n```\r\n\r\n## Cara Menggunakan\r\n### Import Module @danitech/chatgpt-api\r\n#### CJS\r\n```javascript\r\nconst chatGPTAPI = require('@danitech/chatgpt-api');\r\n```\r\n\r\n#### ESM\r\n```javascript\r\nimport chatGPTAPI from '@danitech/chatgpt-api';\r\n```\r\n\r\n### Contoh Kode Lengkap\r\n```javascript\r\nconst { models } = chatGPTAPI;\r\nconst { chatGPT3, chatGPT35, chatGPT4 } = models;\r\n\r\n// GPT-3 model\r\n(async () =\u003e {\r\n  try {\r\n    const response = await chatGPT3('Hello, AI.');\r\n    console.log('ChatGPT-3:', response);\r\n  } catch (error) {\r\n    console.error('Error:', error);\r\n  }\r\n})();\r\n\r\n// GPT-3.5 model\r\n(async () =\u003e {\r\n  try {\r\n    const response = await chatGPT35('Hello, AI.');\r\n    console.log('ChatGPT-3.5:', response);\r\n  } catch (error) {\r\n    console.error('Error:', error);\r\n  }\r\n})();\r\n\r\n// GPT-4 model\r\n(async () =\u003e {\r\n  try {\r\n    const response = await chatGPT4('Hello, AI.');\r\n    console.log('ChatGPT-4:', response);\r\n  } catch (error) {\r\n    console.error('Error:', error);\r\n  }\r\n})();\r\n```\r\n\r\n### Hasil\r\n```text\r\nChatGPT-3: Hello! How can I assist you today?\r\nChatGPT-3.5: Hello! How can I assist you today?\r\nChatGPT-4: Hello! How can I assist you today?\r\n```\r\n\r\n## Informasi\r\n* Pembuat / Pengembang: Dani Ramdani (Dani Techno.) - FullStack Engineer\r\n* Kontak Pembuat / Pengembang: 0895 1254 5999 (WhatsApp), contact@danitechno.com (Email)\r\n\r\n## Terimakasih Kepada\r\n* Dani Techno. - FullStack Engineer (Pembuat / Pengembang)\r\n* daniapi.biz.id (Penyedia JSON-API)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanitechid%2Fchatgpt-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanitechid%2Fchatgpt-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanitechid%2Fchatgpt-api/lists"}