{"id":22884214,"url":"https://github.com/yandricr/gpti-js","last_synced_at":"2025-04-05T08:09:28.696Z","repository":{"id":191802154,"uuid":"685701391","full_name":"yandricr/gpti-js","owner":"yandricr","description":"This package simplifies your interaction with various GPT models, removing the need for tokens or other methods to access GPT","archived":false,"fork":false,"pushed_at":"2024-11-11T21:55:01.000Z","size":207,"stargazers_count":60,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T07:08:46.124Z","etag":null,"topics":["ai","bing","gpt","gpt-free","llama"],"latest_commit_sha":null,"homepage":"https://nexra.aryahcr.cc/","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/yandricr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":["yandricr"],"ko_fi":"yandricr"}},"created_at":"2023-08-31T20:12:31.000Z","updated_at":"2025-01-17T19:20:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"da0cdc66-cf0d-495a-88a7-9cb861de0edd","html_url":"https://github.com/yandricr/gpti-js","commit_stats":null,"previous_names":["yandricr/gpti-js"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandricr%2Fgpti-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandricr%2Fgpti-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandricr%2Fgpti-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandricr%2Fgpti-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yandricr","download_url":"https://codeload.github.com/yandricr/gpti-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305935,"owners_count":20917208,"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","bing","gpt","gpt-free","llama"],"created_at":"2024-12-13T19:16:37.857Z","updated_at":"2025-04-05T08:09:28.663Z","avatar_url":"https://github.com/yandricr.png","language":"JavaScript","funding_links":["https://github.com/sponsors/yandricr","https://ko-fi.com/yandricr","https://www.patreon.com/yandricr"],"categories":[],"sub_categories":[],"readme":"\n# GPTI\n\n![npm](https://img.shields.io/npm/dw/gpti?style=for-the-badge) ![License](https://img.shields.io/npm/l/gpti?style=for-the-badge) [![Contributors](https://img.shields.io/github/contributors/yandricr/gpti-js?style=for-the-badge)](https://github.com/yandricr/gpti-js/graphs/contributors) [![Size Package](https://img.shields.io/github/languages/code-size/yandricr/gpti-js?style=for-the-badge)](https://github.com/yandricr/gpti-js) ![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge\u0026logo=javascript\u0026logoColor=%23F7DF1E) ![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n\n\nThis package simplifies your interaction with various GPT models, eliminating the need for tokens or other methods to access GPT. It also allows you to use three artificial intelligences to generate images: DALL·E, Prodia, and more, some of which are premium while others are free, all of this without restrictions or limits.\n\n## Installation\n\nYou can install the package via NPM\n\n```bash\nnpm i gpti\n```\n\n## Buy code\n\nPurchase my API code through [Patreon](https://www.patreon.com/yandricr) and use it without limitations on any model, hassle-free and with no restrictions.\n\n## Available Models\n\nGPTI provides access to a variety of artificial intelligence models to meet various needs. Currently, the available models include:\n\n- [**ChatGPT**](#gpt)\n- [**GPT-3.5-Turbo**](#gpt-v2)\n- [**ChatGPT Web**](#gptweb)\n- [**GPT-4o**](#gpt-4o)\n- [**Bing**](#bing)\n- [**LLaMA-3.1**](#llama-3.1)\n- [**Blackbox**](#blackbox)\n- [**AI Images**](#ai-images)\n\n## Api key\n\nIf you want to access the premium models, enter your credentials. You can obtain them by [clicking here](https://nexra.aryahcr.cc/api-key/en).\n\n```js\n// import { nexra } from \"gpti\";\n// const { nexra } = require(\"gpti\");\n\nconst { nexra } = require(\"gpti\");\n\nnexra(\"user-xxxxxxxx\", \"nx-xxxxxxx-xxxxx-xxxxx\");\n```\n\n\u003ca id=\"gpt\"\u003e\u003c/a\u003e\n## Usage GPT\n\n```javascript\n// import { gpt } from \"gpti\";\nconst { gpt } = require(\"gpti\");\n\nlet data = await gpt.v1({\n    messages: [\n        {\n            role: \"assistant\",\n            content: \"Hello! How are you today?\"\n        },\n        {\n            role: \"user\",\n            content: \"Hello, my name is Yandri.\"\n        },\n        {\n            role: \"assistant\",\n            content: \"Hello, Yandri! How are you today?\"\n        }\n    ],\n    prompt: \"Can you repeat my name?\",\n    model: \"GPT-4\",\n    markdown: false\n});\n\nconsole.log(data);\n```\n\n#### Models\n\nSelect one of these available models in the API to enhance your experience.\n\n- gpt-4\n- gpt-4-0613\n- gpt-4-32k\n- gpt-4-0314\n- gpt-4-32k-0314\n- gpt-3.5-turbo\n- gpt-3.5-turbo-16k\n- gpt-3.5-turbo-0613\n- gpt-3.5-turbo-16k-0613\n- gpt-3.5-turbo-0301\n- text-davinci-003\n- text-davinci-002\n- code-davinci-002\n- gpt-3\n- text-curie-001\n- text-babbage-001\n- text-ada-001\n- davinci\n- curie\n- babbage\n- ada\n- babbage-002\n- davinci-002\n\n\u003ca id=\"gpt-v2\"\u003e\u003c/a\u003e\n## Usage GPT v2\n\nIt's quite similar, with the difference that it has the capability to generate real-time responses via streaming using gpt-3.5-turbo.\n\n```javascript\n// import { gpt } from \"gpti\";\nconst { gpt } = require(\"gpti\");\n\nlet messages = [\n    {\n        \"role\": \"assistant\",\n        \"content\": \"Hello! How are you today?\"\n    },\n    {\n        \"role\": \"user\",\n        \"content\": \"Hello, my name is Yandri.\"\n    },\n    {\n        \"role\": \"assistant\",\n        \"content\": \"Hello, Yandri! How are you today?\"\n    },\n    {\n        \"role\": \"user\",\n        \"content\": \"Can you repeat my name?\"\n    }\n];\n\nlet data = await gpt.v2({\n    messages: messages,\n    markdown: false,\n    stream: false\n});\n\nconsole.log(data);\n\n/*\n// Streaming\n\ngpt.v2({\n    messages: messages,\n    stream: true,\n    markdown: false,\n    results: (err, data) =\u003e {\n        console.log(err, data);\n    }\n});\n*/\n```\n\n\u003ca id=\"gptweb\"\u003e\u003c/a\u003e\n## Usage GPT Web\n\nGPT-4 has been enhanced by me, but errors may arise due to technological complexity. It is advisable to exercise caution when relying entirely on its accuracy for online queries.\n\n```javascript\n// import { gpt } from \"gpti\";\nconst { gpt } = require(\"gpti\");\n\nlet data = await gpt.web({\n    prompt: \"Are you familiar with the movie Wonka released in 2023?\",\n    markdown: false\n});\n\nconsole.log(data);\n```\n\n\u003ca id=\"gpt-4o\"\u003e\u003c/a\u003e\n## Usage GPT-4o\n\n```javascript\n// import { gpt } from \"gpti\";\nconst { gpt } = require(\"gpti\");\n\nlet history = [\n    {\n        \"role\": \"user\",\n        \"content\": \"Hello! How are you? Could you tell me your name?\"\n    }\n];\n\nlet data = await gpt.v3({\n    messages: history,\n    markdown: false,\n    stream: false\n});\n\nconsole.log(data);\n\n/*\n// Streaming\n\ngpt.v3({\n    messages: history,\n    stream: true,\n    markdown: false,\n    results: (err, data) =\u003e {\n        console.log(err, data);\n    }\n});\n*/\n```\n\n\u003ca id=\"bing\"\u003e\u003c/a\u003e\n## Usage Bing\n\n```javascript\n// import { bing } from \"gpti\";\nconst { bing } = require(\"gpti\");\n\nlet history = [\n    {\n        role: \"assistant\",\n        content: \"Hello! How can I help you today? 😊\"\n    },\n    {\n        role: \"user\",\n        content: \"Hi, tell me the names of the movies released in 2023.\"\n    },\n    {\n        role: \"assistant\",\n        content: \"Certainly! Here are some movies that were released in 2023:\\n\\n1.  **About My Father** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n2.  **The Little Mermaid** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n3.  **Fast X** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n4.  **Spider-Man: Across the Spider-Verse** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n5.  **The Machine** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n6.  **Book Club: The Next Chapter** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n7.  **Guardians of the Galaxy Vol. 3** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n8.  **John Wick: Chapter 4** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n9.  **Are You There God? It's Me, Margaret** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n10.  **Evil Dead Rise** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n11.  **The Super Mario Bros. Movie** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n12.  **Love Again** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n13.  **Kandahar** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n14.  **Dungeons \u0026 Dragons: Honor Among Thieves** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n15.  **Shin Kamen Rider** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n16.  **Knights of the Zodiac** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n17.  **The Pope's Exorcist** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n18.  **Shazam! Fury of the Gods** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n19.  **All That Breathes** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n20.  **Sailor Moon Cosmos** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n21.  **Hypnotic** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n22.  **Sound of Freedom** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n23.  **The Boogeyman** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n24.  **Chicken Run: Dawn of the Nugget** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n25.  **A Lot of Nothing** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n26.  **Followers** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n27.  **Big George Foreman** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n28.  **Asterix \u0026 Obelix: The Middle Kingdom** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n29.  **Ant-Man and the Wasp: Quantumania** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n30.  **Transformers: Rise of the Beasts** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n31.  **Follow Her** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n32.  **Prom Pact** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n33.  **God Is a Bullet** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n34.  **Still: A Michael J. Fox Movie** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n35.  **Nefarious** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n36.  **Nanny Dearest** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n37.  **Monica** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n38.  **Wild Life** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n39.  **Palm Trees and Power Lines** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n40.  **What's Love Got to Do with It?** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n41.  **Creed III** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n42.  **One True Loves** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n43.  **BlackBerry** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n44.  **Suzume** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n45.  **Rock Dog 3: Battle the Beat** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n46.  **Gridman Universe** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n47.  **Digimon Adventure 02: The Beginning** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n48.  **Woman of the Photographs** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n49.  **El Tonto** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n50.  **Seriously Red** [^1^](https://editorial.rottentomatoes.com/guide/best-movies-of-2023/)\\n\\nI hope this helps! Let me know if you have any other questions.\"\n    },\n    {\n        role: \"user\",\n        content: \"Can you tell me how many movies you've told me about?\"\n    }\n];\n\nlet data = await bing({\n    messages: history,\n    conversation_style: \"Balanced\",\n    markdown: false,\n    stream: false\n});\n\nconsole.log(data);\n\n/*\n// Streaming\n\nbing({\n    messages: history,\n    conversation_style: \"Balanced\",\n    stream: true,\n    markdown: false,\n    results: (err, data) =\u003e {\n        console.log(err, data);\n    }\n});\n*/\n```\n\n#### Parameters\n\n| Parameter          | Default  | Description                                                                                             |\n|--------------------|----------|---------------------------------------------------------------------------------------------------------|\n| conversation_style | Balanced | You can use between: \"Balanced\", \"Creative\" and \"Precise\"                                               |\n| markdown           | false    | You can convert the dialogues into continuous streams or not into Markdown                                |\n| stream             | false    | You are given the option to choose whether you prefer the responses to be in real-time or not            |\n\n\u003ca id=\"llama-3.1\"\u003e\u003c/a\u003e\n## Usage LLaMA 3.1\n\n```javascript\n// import { llama } from \"gpti\";\nconst { llama } = require(\"gpti\");\n\nlet history = [\n    {\n        \"role\": \"user\",\n        \"content\": \"Hello! How are you? Could you tell me your name?\"\n    }\n];\n\nlet data = await llama({\n    messages: history,\n    markdown: false,\n    stream: false\n});\n\nconsole.log(data);\n\n/*\n// Streaming\n\nllama({\n    messages: history,\n    stream: true,\n    markdown: false,\n    results: (err, data) =\u003e {\n        console.log(err, data);\n    }\n});\n*/\n```\n\n\u003ca id=\"blackbox\"\u003e\u003c/a\u003e\n## Usage Blackbox\n\n```javascript\n// import { blackbox } from \"gpti\";\nconst { blackbox } = require(\"gpti\");\n\nlet history = [\n    {\n        \"role\": \"user\",\n        \"content\": \"Hello! How are you? Could you tell me your name?\"\n    }\n];\n\nlet data = await blackbox({\n    messages: history,\n    markdown: false,\n    stream: false\n});\n\nconsole.log(data);\n\n/*\n// Streaming\n\nblackbox({\n    messages: history,\n    stream: true,\n    markdown: false,\n    results: (err, data) =\u003e {\n        console.log(err, data);\n    }\n});\n*/\n```\n\n\u003ca id=\"ai-images\"\u003e\u003c/a\u003e\n## AI Images\n\nCheck the documentation [here](https://nexra.aryahcr.cc/documentation/en) to learn how to use the different image generation models.\n\n```javascript\n// import { imageai } from \"gpti\";\nconst { imageai } = require(\"gpti\");\n\nlet data = await imageai({\n    prompt: \"cat color red\",\n    model: \"dalle\",\n    response: \"url\" | \"base64\",\n    data: {}\n});\n\nconsole.log(data);\n```\n\n## API Reference\n\nCurrently, some models require your credentials to access them, while others are free. For more details and examples, please refer to the complete [documentation](https://nexra.aryahcr.cc/).\n\n#### Code Errors\n\nThese are the error codes that will be presented in case the API fails.\n\n| Code |                 Error | Description                                    |\n|------|----------------------:|------------------------------------------------|\n| 400  | BAD_REQUEST           | Not all parameters have been entered correctly |\n| 500  | INTERNAL_SERVER_ERROR | The server has experienced failures            |\n| 200  |                       | The API worked without issues                  |\n| 403  | FORBIDDEN             | The API credentials are not valid              |\n| 401  | UNAUTHORIZED          | API credentials are required                   |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyandricr%2Fgpti-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyandricr%2Fgpti-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyandricr%2Fgpti-js/lists"}