JSPM

  • Created
  • Published
  • Downloads 99313
  • Score
    100M100P100Q154556F
  • License GPL-3.0

A powerful library for interacting with the Herc.ai API

Package Exports

  • hercai
  • hercai/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hercai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Discord Buy Me A Coffee

Herc.ai

A powerful library for interacting with the Herc.ai API.

We Offer It To You For Free. Herc.ai Answers Your Question According To The Language, And It Supports All Languages.

✨ How about a one-time subscription to benefit from Hercai's features unlimitedly? ✨ Use Hercai Unlimited with API Key! #

Support

📂 NPM

📝 Github

Example On CLI

Installation

🔲 Installation For CLI

npm i hercai -g

📂 Installation

npm i hercai 

Quick Example

Question API; https://hercai.onrender.com/v3-beta/hercai?question=

Example Question For CommonJS;

/* Importing The Package */
const { Hercai } = require('hercai');

const herc = new Hercai(); //{apiKey:"your api key"} => Optional

/* Available Models */
/* "v3-beta" */
/* Default Model; "v3-beta" */
herc.question({model:"v3-beta",content:"hi, how are you?"}).then(response => {
console.log(response.reply);
/* The module will reply based on the message! */

});

Text To Image API; https://hercai.onrender.com/v3/text2image?prompt=

Example Draw Image For CommonJS;

/* Importing The Package */
const { Hercai } = require('hercai');

const herc = new Hercai(); //{apiKey:"your api key"} => Optional

/* Available Models */
/* "v1" , "v2" , "v2-beta" , "v3" (DALL-E) , "lexica" , "prodia" */
/* Default Model; "v2" */
herc.drawImage({model:"v2",prompt:"anime girl"}).then(response => {
console.log(response.url);
/* The module will reply based on the prompt! */

});

Example Interface And Usage For TypeScript;

import { Hercai, QuestionData, DrawImageData } from "hercai";

const herc = new Hercai(); //{apiKey:"your api key"} => Optional

/* Question Example For TypeScript */
herc.question({model:"v3-beta",content:"hi, how are you?"})
.then((response:QuestionData) => {
console.log(response.reply);
});

/* DrawImage Example For TypeScript */
herc.drawImage({model:"v2",prompt:"anime girl"})
.then((response:DrawImageData) => {
console.log(response.url);
});

Example CLI Command Usage;

hercai <Your Question>

Herc.ai Also Supports TypeScript And EsModule 🥳!

Credits

Made by FiveSoBes And Luppux Development

Contact & Support & Donate

Buy Me A Coffee

Discord Banner