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);
console.log(result.result);
const customResult = await Freejourney.filterText("Just shut the fuck up bro, you're shit at this game!", "~");
console.log(customResult.text);
console.log(customResult.result);
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": "...."
}