{"id":28972747,"url":"https://github.com/textcortex/textcortex-hemingwai-js","last_synced_at":"2025-07-05T09:06:20.118Z","repository":{"id":40653039,"uuid":"437959364","full_name":"textcortex/textcortex-hemingwai-js","owner":"textcortex","description":"TextCortex API javascript packages for generating content even faster!","archived":false,"fork":false,"pushed_at":"2022-04-30T10:17:00.000Z","size":104,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"staging","last_synced_at":"2025-06-03T12:49:12.522Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/textcortex.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}},"created_at":"2021-12-13T17:13:05.000Z","updated_at":"2021-12-24T10:34:00.000Z","dependencies_parsed_at":"2022-08-10T00:01:04.510Z","dependency_job_id":null,"html_url":"https://github.com/textcortex/textcortex-hemingwai-js","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/textcortex/textcortex-hemingwai-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textcortex%2Ftextcortex-hemingwai-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textcortex%2Ftextcortex-hemingwai-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textcortex%2Ftextcortex-hemingwai-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textcortex%2Ftextcortex-hemingwai-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/textcortex","download_url":"https://codeload.github.com/textcortex/textcortex-hemingwai-js/tar.gz/refs/heads/staging","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textcortex%2Ftextcortex-hemingwai-js/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261658590,"owners_count":23191089,"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":[],"created_at":"2025-06-24T11:08:28.223Z","updated_at":"2025-06-24T11:08:30.191Z","avatar_url":"https://github.com/textcortex.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [textcortex-hemingwai-js](https://textcortex.com/documentation/api)\n\n![textcortex-hemingwai-js](./textcortex_logo.png)\n\nTextCortex API javascript packages for generating content even faster! Generate product descriptions, blogs, ads and more using GPT architecture with a single request to TextCortex API a.k.a HemingwAI\n\n## Table of Contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [textcortex-hemingwai-js](#textcortex-hemingwai-js)\n  - [Table of Contents](#table-of-contents)\n  - [Installation and usage](#installation-and-usage)\n    - [Get your api key:](#get-your-api-key)\n    - [Response:](#response)\n    - [API key related errors](#api-key-related-errors)\n  - [What kind of texts are possible to generate?](#what-kind-of-texts-are-possible-to-generate)\n  - [Text Generation Variables](#text-generation-variables)\n  - [Examples](#examples)\n  - [Issues](#issues)\n    - [❓ Questions](#-questions)\n    - [🐞 Bugs](#-bugs)\n    - [💡 Feature Requests](#-feature-requests)\n  - [Maintainer/Creator](#maintainercreator)\n      - [License](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Installation and usage\n\nThe easiest way to install textcortex-hemingwai-js is using npm or yarn.\n\n```\nyarn add textcortex-hemingwai-js\n```\n\nOr\n\nfor installation via yarn\n\n```\nnpm install textcortex-hemingwai-js\n```\n\n### Get your api key:\n\n1. Signup at https://textcortex.com\n2. Sign-in and click on account on top right.\n3. Go to API Key section and copy your key.\n\n\\\nStart generating content with a single line of code!\n\n```js\nimport { TextCortex } from \"textcortex-hemingwai-js\";\n\nconst hemingwai = new TextCortex(YOUR_API_KEY);\n\nhemingwai.generateProductDescriptions({\n  product_title: \"Headphone\",\n  product_brand: \"JBL\",\n  product_features: [\"Noise canceling\"],\n  product_category: [\"electronics\"],\n  source_language: \"en\",\n});\n```\n\n### Response:\n\n```js\n{\n  status: \"success\",\n  ai_results: [\n    {\n      generated_text: ` The JBL K8 In-Ear Noise Canceling Earbuds are designed to block out unwanted  ambient noise while you're on the go. If you prefer music without distraction,  these earphones will do the job for you. Made with a dynamic driver and an inline microphone for exceptional sound quality,  they come in black and feature built-in volume control.`,\n      rank: 0.9762,\n      text_length: 336,\n      word_frequency: [],\n      word_count: 56,\n    },\n  ],\n  error: 200,\n}\n```\n\n### API key related errors\n\nAPI key related errors have an error message attached to them as follows:\n\n```js\nif (errorData.error === 403) {\n  throw {\n    errorMessage:\n      \"API Key is invalid. Check out your API key on https://app.textcortex.com/user/account\",\n    ...error,\n  };\n} else if (errorData.error === 402) {\n  throw {\n    errorMessage:\n      \"Reached API Limits, increase limits by contacting us at dev@textcortex.com or upgrade your account\",\n    ...error,\n  };\n}\n```\n\n## What kind of texts are possible to generate?\n\nCurrently we support the following methods for generating copy text like the following:\n\n```js\n// Generate Blog Articles:\nhemingwai.generateBlog;\n\n// Autocomplete the rest using Hemingwai\nhemingwai.generate;\n\n// Generate Ad copies using Hemingwai\nhemingwai.generateAds;\n\n// Generate Email Body using Hemingwai\nhemingwai.generateEmailBody;\n\n// Generate Email Subject using Hemingwai\nhemingwai.generateEmailSubject;\n\n// Generate Product Descriptions using Hemingwai\nhemingwai.generateProductDescriptions;\n```\n\n## Text Generation Variables\n\nThere are some variables that you need to send before making a request to Hemingwai.\n\nHere is a brief summary of what those variables are:\n\n- `prompt`: Prompting the HemingwAI to start writing on a specific subject\n\n- `creativity`: Floating number between 0-1. 0 being the lowest creativity and 1 being the highest. Default is 0.7\n\n- `character_length`: Integer which defines the maximum amount of characters that can be produced by the HemingwAI\n\n- `source_language`: Language code of the source language of the written prompt. for example 'en' for English and 'de' for German.\n  [We support 72 languages](https://docs.aws.amazon.com/translate/latest/dg/what-is.html#what-is-languages). If you don't know the language code you can also use 'auto' for this field to automatically sense the input language.\n\n- `parameters`: Used for setting the tone of the generated copy text. It can be basically anything but please keep it plausible :)\n\n\u003cbr/\u003e\n\n## Examples\n\nSee [examples](https://github.com/textcortex/textcortex-hemingwai-js/tree/main/examples) for examples.\n\nNote: while generating ads, you can add your target segment as an option.\n\n\u003cbr/\u003e\n\n## Issues\n\nLooking to contribute? You are welcome. Just fork and PR to staging branch.\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n### ❓ Questions\n\nYou can have a look at the [HemingwAI's documentation](https://textcortex.com/documentation/api) on TextCortex website\n\u003cbr/\u003e\n\nOr talk to us at the [TextCortex Dev Community on slack](https://join.slack.com/t/textcortexaicommunity/shared_invite/zt-rmaw7j10-Lz9vf86aF5I_fYZAS7JafQ)\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n### 🐞 Bugs\n\nPlease file an issue for bugs, missing documentation, or unexpected behavior.\n\n[**See Bugs**][bugs]\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n### 💡 Feature Requests\n\nWe are happy. Please file an issue to suggest new features. Vote on feature requests by adding a 👍. This helps maintainers prioritize what to work on.\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## Maintainer/Creator\n\n[TextCortex Team](https://textcortex.com) and [Abreham Gezahegn](https://github.com/abrehamgezahegn)\n\n#### License\n\nMIT\n\n[bugs]: https://github.com/textcortex/textcortex-hemingwai-js/labels/bug\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextcortex%2Ftextcortex-hemingwai-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftextcortex%2Ftextcortex-hemingwai-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextcortex%2Ftextcortex-hemingwai-js/lists"}