npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

freejourney

v1.0.4

Published

A client library for interacting with the Freejourney API.

Downloads

16

Readme

Freejourney API Client

A client library for interacting with the Freejourney API.

Prerequisites

This project requires Node.js and npm to be installed on your machine.

Getting Started

To get started with the Freejourney API Client, follow the installation instructions below.

Installation

You can install the Freejourney API Client via npm:

npm install freejourney

Usage

First, import the Freejourney API client:

const freejourney = require('freejourney');

Then, create a new instance of the Freejourney API client with your API key:

const Rreejourney = new Freejourney('your_api_key');

Now you can use the various methods provided by the Freejourney API client:

To access the Freejourney API (api.freejourney.xyz), a Freejourney API key is mandatory for all POST requests. Currently, acquiring an API key necessitates opening a support ticket via our Discord support server (no worries, it's free!). Once initiated, you'll be prompted for specific details regarding your API key usage. Discord server: https://freejourney.xyz/discord

Chat Completion

ChatGPT-4

Creates a chat completion using the ChatGPT-4 model.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | prompt | string | Required. The prompt to send to the model |

Freejourney.chatCompletion.chatGPT4(prompt)
.then(result =>{
    console.log(result.completion)
})
.catch(error =>{
    console.log(error)
    console.log("Error !")
})
{
    "prompt": "Hey there! Tell me about yourself with a short response.",
    "completion": "I'm Gemini, a multi-modal AI model, developed by Google. I'm designed to assist and provide information to the best of my abilities."
}

ChatGPT-4 34k

Creates a chat completion using the ChatGPT-4 34k model.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | prompt | string | Required. The prompt to send to the model |

Freejourney.chatCompletion.chatGPT4_34k(prompt)
.then(result =>{
    console.log(result.completion)
})
.catch(error =>{
    console.log(error)
    console.log("Error !")
})
{
    "prompt": "Hey there! Tell me about yourself with a short response.",
    "completion": "I'm Gemini, a multi-modal AI model, developed by Google. I'm designed to assist and provide information to the best of my abilities."
}

ChatGPT-3.5 Turbo

Creates a chat completion using the ChatGPT-3.5 Turbo model.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | prompt | string | Required. The prompt to send to the model |

Freejourney.chatCompletion.chatGPT3_5_Turbo(prompt)
.then(result =>{
    console.log(result.completion)
})
.catch(error =>{
    console.log(error)
    console.log("Error !")
})
{
    "prompt": "Hey there! Tell me about yourself with a short response.",
    "completion": "I'm Gemini, a multi-modal AI model, developed by Google. I'm designed to assist and provide information to the best of my abilities."
}

ChatGPT-3.5 Turbo 16k

Creates a chat completion using the ChatGPT-3.5 16k Turbo model.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | prompt | string | Required. The prompt to send to the model |

Freejourney.chatCompletion.chatGPT3_5_Turbo_16k(prompt)
.then(result =>{
    console.log(result.completion)
})
.catch(error =>{
    console.log(error)
    console.log("Error !")
})
{
    "prompt": "Hey there! Tell me about yourself with a short response.",
    "completion": "I'm Gemini, a multi-modal AI model, developed by Google. I'm designed to assist and provide information to the best of my abilities."
}

Gemini

Creates a chat completion using the Gemini (Bard) model.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | prompt | string | Required. The prompt to send to the model |

Freejourney.chatCompletion.gemini(prompt)
.then(result =>{
    console.log(result.completion)
})
.catch(error =>{
    console.log(error)
    console.log("Error !")
})
{
    "prompt": "Hey there! Tell me about yourself with a short response.",
    "completion": "I'm Gemini, a multi-modal AI model, developed by Google. I'm designed to assist and provide information to the best of my abilities."
}

AI Character

Creates a chat completion for a given AI character.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | model | string | Required. ID of the character model | | prompt | string | Required. The prompt to send to the model |

Freejourney.chatCompletion.character(model, prompt)
.then(result =>{
    console.log(result.completion)
})
.catch(error =>{
    console.log(error)
    console.log("Error !")
})
{
    "prompt": "Hey Steve! Can you tell me more about the Demogorgon?",
    "completion": "Oh, man, the Demogorgon? Let me tell you, that thing is the real deal. It's like straight out of a nightmare, with all those teeth and creepy movements. We had to face that sucker head-on, and let me tell you, it was no walk in the park. It's a whole other level of crazy, like a monster from another dimension or something. Just thinking about it gives me the chills. But hey, we took it down once, we can do it again.",
    "model": {
        "model_id": "steve_harrington",
        "model_name": "Steve Harrington",
        "model_description": "A recurring character in 'Stranger Things.' Initially portrayed as a typical high school jock, Steve undergoes significant character development to become a reliable ally to the main group of kids."
    }
}

The list of all available models is available here. You can also request characters you would like to use or even create yours and submit it in our Discord server !

Fun

Dad joke

Returns a random "Dad joke"

Freejourney.fun.dadJoke()
.then(result =>{
    console.log(result.joke)
})
.catch(error =>{
    console.log(error)
    console.log("Error !")
})
{
    "joke": "No matter how kind you are, German children are kinder."
}

Trivia question

Returns a random trivia question.

Freejourney.fun.trivia()
.then(result =>{
    console.log(result.question)
})
.catch(error =>{
    console.log(error)
    console.log("Error !")
})
{
    "question": "Bogotá is the capital city of which country?",
    "answers": {
      "correct": "Colombia",
      "incorrect": [
        "Libya",
        "Eritrea",
        "El Salvador"
      ]
    },
    "difficulty": "medium"
}

Random fact

Returns a random fact.

Freejourney.fun.randomFact()
.then(result =>{
    console.log(result.fact)
})
.catch(error =>{
    console.log(error)
    console.log("Error !")
})
{
    "fact": "More bullets were fired in `Starship Troopers` than any other movie ever made."
}

Animals

Random cat fact

Returns a random cat fact.

Freejourney.animals.catFact()
.then(result =>{
    console.log(result.fact)
})
.catch(error =>{
    console.log(error)
    console.log("Error !")
})
{
    "fact": "The ancestor of all domestic cats is the African Wild Cat which still exists today."
}

Random dog fact

Returns a random dog fact.

Freejourney.animals.dogFact()
.then(result =>{
    console.log(result.fact)
})
.catch(error =>{
    console.log(error)
    console.log("Error !")
})
{
    "fact": "Two stray dogs in Afghanistan saved 50 American soliders. A Facebook group raised $21,000 to bring the dogs back to the US and reunite them with the soldiers."
}

Moderation

Filter text (hard-coded)

Filters a text, replacing all moderated words by * or a specified character.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | text | string | Required. The text to filter | | fill | string | The character to use to replace moderated words. Accepted characters: _ ~ - = | * |

const result = await Freejourney.moderation.filterText("Just shut the fuck up bro, you're shit at this game!");

console.log(result.text);
// Output: "Just shut the fuck up bro, you're shit at this game!"

console.log(result.result);
// Output: "Just shut the **** up bro, you're **** at this game!"

// Example using a character other than *
const customResult = await Freejourney.filterText("Just shut the fuck up bro, you're shit at this game!", "~");

console.log(customResult.text);
// Output: "Just shut the fuck up bro, you're shit at this game!"

console.log(customResult.result);
// Output: "Just shut the ~~~~ up bro, you're ~~~~ at this game!"

Images

QR Code

Creates a QR code.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | text | string | Required. The text/URL to use for the QR code. |

const result = await Freejourney.images.createQRCode(text);
{
    "base64": "...."
}

Remove image background

Removes the background of an image.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | imageUrl | string | Required. The URL of the image to remove the background from. |

const result = await Freejourney.images.removeBackground(imageUrl);
{
    "base64": "...."
}

Scroll of Truth

Creates a "Scroll of Truth" meme.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | text | string | Required. The text to display on the meme. |

const result = await Freejourney.images.createScrollOfTruth(text);
{
    "base64": "...."
}

Minecraft Achievement

Creates a "Minecraft Achievement" meme.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | text | string | Required. The text to display on the meme. |

const result = await Freejourney.images.createMinecraftAchievement(text);
{
    "base64": "...."
}

Minecraft Challenge

Creates a "Minecraft Challenge" meme.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | text | string | Required. The text to display on the meme. |

const result = await Freejourney.images.createMinecraftChallenge(text);
{
    "base64": "...."
}

Calling

Creates a "Calling" meme.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | text | string | Required. The text to display on the meme. |

const result = await Freejourney.images.createCallingMeme(text);
{
    "base64": "...."
}

Captcha

Creates a "Captcha" meme.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | text | string | Required. The text to display on the meme. |

const result = await Freejourney.images.createCaptchaMeme(text);
{
    "base64": "...."
}

Did you mean

Creates a "Did you mean" meme.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | text | string | Required. The text to display on the meme. | | textBottom | string | Required. The bottom text to display on the meme. |

const result = await Freejourney.images.createDidYouMeanMeme(text, textBottom);
{
    "base64": "...."
}

Facts

Creates a "Facts" meme.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | text | string | Required. The text to display on the meme. |

const result = await Freejourney.images.createFactsMeme(text);
{
    "base64": "...."
}

PornHub Brand

Creates a "PornHub Brand" meme.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | text | string | Required. The text to display on the meme. | | textRight | string | Required. The second text to use. |

const result = await Freejourney.images.createPornHubBrandMeme(text, textRight);
{
    "base64": "...."
}

Midjourney Search

Searches for images created with the Midjourney bot.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | query | string | Required. The text to use for the search. |

const result = await Freejourney.images.searchMidjourneyImages(query);
[
    {
        "url": "https://cdn.discordapp.com/attachments/997271832405225572/1233353755777568768/vivek.pal_Create_a_Labrador_cute_dog_wearing_Engineers_Safety_H_7d858f24-79cd-45f8-83a1-27baba6f7914.png?ex=662cc9b1&is=662b7831&hm=415260c83ab1dbab597ca7bcb21d917ab82189f7680fd3df3392667738830506&",
        "prompt": "Create a Labrador cute dog wearing Engineers Safety Helmet on laboue day, in white theme"
    },
    {
        "url": "...",
        "prompt": "..."
    }
]

Nijijourney Search

Searches for images created with the Nijijourney bot.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | query | string | Required. The text to use for the search. |

const result = await Freejourney.images.searchNijijourneyImages(query);
[
    {
        "url": "https://cdn.discordapp.com/attachments/1051067680255393862/1234387546507837511/maxi_0021_simplistic_cute_cartoonish_characters_design_small__c_06af8fa0-7e7a-44e0-8a89-f56c35b0540a.png?ex=66308c7c&is=662f3afc&hm=235670639cf1b567440d1ccfa79afad2741308f27bdb2c818a47e75315c4c135&",
        "prompt": "simplistic, cute, cartoonish, characters design, small , chibi --ar 3:4 --niji 6"
    },
    {
        "url": "...",
        "prompt": "..."
    }
]

DALL-E Search

Searches for images created with DALL-E.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | query | string | Required. The text to use for the search. | | number | string | Required. The number of images to return; can only be 1 or 4. |

const result = await Freejourney.images.searchDALLEImages(query, number);
{
    "base64": "...."
}

Stable Diffusion

Searches for images created with Stable Diffusion.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | query | string | Required. The text to use for the search. | | number | string | Required. The number of images to return; can only be 1 or 4. |

const result = await Freejourney.images.searchStableDiffusionImages(query, number);
{
    "base64": "...."
}