globalsprak
v1.0.7
Published
globalsprak is a Node.js package that provides access to various AI models, image generation, content downloading from various platforms, and more.
Downloads
633
Maintainers
Readme
GLOBALSPRAK
globalsprak is a Node.js package that provides access to various AI models, image generation, content downloading from various platforms, and more.
Join our discord server
💻 Discord Server 💻
Made by Aryan Chauhan
Installation
You can install the package using npm:
npm i globalsprak
All Informations are not available join our discord server for more informations, thank you for using our services 🌷🥰
AI MODELS
AI Chat Completions
- Function:
ai(prompt, model)
- Description: Fetches AI-generated chat completions using the provided prompt and model.
- Parameters:
prompt
(string): The prompt or question for the AI to generate a response.model
(string): The specific AI model to use for generating responses.
- Example:
const { ai } = require('globalsprak'); async function main() { const prompt = "What is the capital of France?"; const model = "gpt-4o-mini-free"; const response = await ai(prompt, model); console.log("AI Response:", response); } main();
List of Available Models
- gpt-4o-mini-free
- gpt-4o-mini
- gpt-4o-free
- o1-preview
- o1-mini
- gpt-4-turbo-2024-04-09
- gpt-4o-2024-08-06
- grok-2
- grok-2-mini
- claude-3-opus-20240229
- claude-3-opus-20240229-aws
- claude-3-opus-20240229-gcp
- claude-3-sonnet-20240229
- claude-3-5-sonnet-20240620
- claude-3-haiku-20240307
- claude-2.1
- gemini-1.5-flash-exp-0827
- gemini-1.5-pro-exp-0827
GPT
Get a response from the GPT model based on your prompt.
const { gpt } = require('globalsprak');
async function main() {
const prompt = "What is AI?";
const response = await gpt(prompt);
console.log("GPT Response:", response);
}
main();
ChatGPT
Function:
chatgpt(prompt)
Description: Retrieves a response from the ChatGPT model based on the provided prompt.
Example:
const { chatgpt } = require('globalsprak'); async function main() { const prompt = "What's the best way to learn programming?"; const response = await chatgpt(prompt); console.log("ChatGPT Response:", response); } main();
GPTWeb
- Function:
gptweb(prompt)
- Description: Retrieves a web-enhanced response from the GPT model based on the provided prompt.
- Example:
const { gptweb } = require('globalsprak'); async function main() { const prompt = "Latest tech trends in 2024"; const response = await gptweb(prompt); console.log("GPTWeb Response:", response); } main();
- Function:
Llama
Get a response from the Llama AI model.
const { llama } = require('globalsprak');
async function main() {
const prompt = "Tell me a joke";
const response = await llama(prompt);
console.log("Llama Response:", response);
}
main();
Mixtral
Get a response from the Mixtral AI model.
const { mixtral } = require('globalsprak');
async function main() {
const prompt = "Explain quantum mechanics";
const response = await mixtral(prompt);
console.log("Mixtral Response:", response);
}
main();
Coral
Interact with Coral or reset conversation context.
Regular Chat with Coral
const { coral } = require('globalsprak');
async function main() {
const prompt = "How's the weather today?";
const response = await coral(prompt);
console.log("Coral Response:", response);
}
main();
Chat with Coral using User ID
const { coralchat } = require('globalsprak');
async function main() {
const prompt = "Tell me a story";
const uid = "user123";
const response = await coralchat(prompt, uid);
console.log("Coral Chat Response:", response);
}
main();
Reset Coral Conversation
const { coralreset } = require('globalsprak');
async function main() {
const uid = "user123";
const response = await coralreset(uid);
console.log("Coral Reset Response:", response);
}
main();
Image's Generation
Animagen
- Function:
animagen(prompt, count)
- Description: Generates anime-style art based on the provided prompt.
- Parameters:
prompt
(string): The prompt to generate anime-style art.count
(number): The number of images to generate.
- Example:
const { animagen } = require('globalsprak'); async function main() { const prompt = "Create anime-style art"; const count = 3; const response = await animagen(prompt, count); console.log("Animagen Response:", response); } main();
PixelArt
- Function:
pixelart(prompt, count)
- Description: Generates pixel art based on the provided prompt.
- Parameters:
prompt
(string): The prompt to generate pixel art.count
(number): The number of images to generate.
- Example:
const { pixelart } = require('globalsprak'); async function main() { const prompt = "Create a pixel art character"; const count = 2; const response = await pixelArt(prompt, count); console.log("PixelArt Response:", response); } main();
Xi
- Function:
xi(prompt, count)
- Description: Generates art based on the Xi engine using the provided prompt.
- Parameters:
prompt
(string): The prompt to generate art with the Xi engine.count
(number): The number of images to generate.
- Example:
const { xi } = require('globalsprak'); async function main() { const prompt = "Create surreal landscape art"; const count = 1; const response = await xi(prompt, count); console.log("Xi Response:", response); } main();
Gen
- Function:
gen(prompt, count)
- Description: Generates art based on a generic engine using the provided prompt.
- Parameters:
prompt
(string): The prompt to generate generic art.count
(number): The number of images to generate.
- Example:
const { gen } = require('globalsprak'); async function main() { const prompt = "Generate futuristic city art"; const count = 4; const response = await gen(prompt, count); console.log("Gen Response:", response); } main();
Gen2
- Function:
gen2(prompt, count)
- Description: Generates art using the Gen2 engine based on the provided prompt.
- Parameters:
prompt
(string): The prompt to generate Gen2 art.count
(number): The number of images to generate.
- Example:
const { gen2 } = require('globalsprak'); async function main() { const prompt = "Create abstract artwork"; const count = 5; const response = await gen2(prompt, count); console.log("Gen2 Response:", response); } main();
XL3
- Function:
xl3(prompt)
- Description: Fetches a response from the XL3 API using the provided prompt.
- Example:
const { xl3 } = require('globalsprak'); async function main() { const prompt = "Prompts"; const response = await xl3(prompt); console.log("XL3 Response:", response); } main();
Flux
- Function:
flux(prompt)
- Description: Fetches a response from the Flux API using the provided prompt.
- Example:
const { flux } = require('globalsprak'); async function main() { const prompt = "Your Flux prompt"; const response = await flux(prompt); console.log("Flux Response:", response); } main();
Mini DALL-E
- Function:
minidalle(prompt)
- Description: Fetches a response from the Mini DALL-E API using the provided prompt.
- Example:
const { minidalle } = require('globalsprak'); async function main() { const prompt = "Your Mini DALL-E prompt"; const response = await minidalle(prompt); console.log("Mini DALL-E Response:", response); } main();
DALL-E v2
- Function:
dallev2(prompt)
- Description: Fetches a response from the DALL-E v2 API using the provided prompt.
- Example:
const { dallev2 } = require('globalsprak'); async function main() { const prompt = "Your DALL-E v2 prompt"; const response = await dallev2(prompt); console.log("DALL-E v2 Response:", response); } main();
DALL-E v3
- Function:
dalle(prompt, prompt_negative, width, height, guidance_scale)
- Description: Fetches a response from the DALL-E v3 API with additional parameters like negative prompt, image dimensions, and guidance scale.
- Example:
const { dalle } = require('globalsprak'); async function main() { const prompt = "Your DALL-E v3 prompt"; const prompt_negative = "Negative prompt"; const width = 512; const height = 512; const guidance_scale = 7.5; const response = await dalle(prompt, prompt_negative, width, height, guidance_scale); console.log("DALL-E v3 Response:", response); } main();
XL
- Function:
xl(prompt, prompt_negative, image_style, guidance_scale)
- Description: Fetches a response from the XL API for image generation with specific image style and guidance scale.
- Example:
const { xl } = require('globalsprak'); async function main() { const prompt = "Your XL prompt"; const prompt_negative = "Negative prompt"; const image_style = "artistic"; const guidance_scale = 7.5; const response = await xl(prompt, prompt_negative, image_style, guidance_scale); console.log("XL Response:", response); } main();
Generate
- Function:
generate(prompt)
- Description: Fetches a response from the text generation API using the provided prompt.
- Example:
const { generate } = require('globalsprak'); async function main() { const prompt = "Your text prompt"; const response = await generate(prompt); console.log("Generate Response:", response); } main();
EMI
Generate image's using EMI Model.
const { emi } = require('globalsprak');
async function main() {
const prompt = "Cute Girl.";
const response = await emi(prompt);
console.log("EMI Response:", response);
}
main();
BING
Generate image's using EMI Model.
const { bing } = require('globalsprak');
async function main() {
const prompt = "Cute Girl.";
const cookie = "";
const response = await bing(prompt, cookie);
console.log("Bing Response:", response);
}
main();
Prodia
Generate images using a text prompt and a model.
const { prodia } = require('globalsprak');
async function main() {
const prompt = "A beautiful mountain landscape";
const model = "1";
const response = await prodia(prompt, model);
console.log("ProdIA Response:", response);
}
main();
Models
List of Models
Please choose Prodia models by number (e.g., 1, 2, 3, etc.).
- 3Guofeng3_v34.safetensors [50f420de]
- absolutereality_V16.safetensors [37db0fc3]
- absolutereality_v181.safetensors [3d9d4d2b]
- amIReal_V41.safetensors [0a8a2e61]
- analog-diffusion-1.0.ckpt [9ca13f02]
- anythingv3_0-pruned.ckpt [2700c435]
- anything-v4.5-pruned.ckpt [65745d25]
- anythingV5_PrtRE.safetensors [893e49b9]
- AOM3A3_orangemixs.safetensors [9600da17]
- blazing_drive_v10g.safetensors [ca1c1eab]
- breakdomain_I2428.safetensors [43cc7d2f]
- breakdomain_M2150.safetensors [15f7afca]
- cetusMix_Version35.safetensors [de2f2560]
- childrensStories_v13D.safetensors [9dfaabcb]
- childrensStories_v1SemiReal.safetensors [a1c56dbb]
- childrensStories_v1ToonAnime.safetensors [2ec7b88b]
- Counterfeit_v30.safetensors [9e2a8f19]
- cuteyukimixAdorable_midchapter3.safetensors [04bdffe6]
- cyberrealistic_v33.safetensors [82b0d085]
- dalcefo_v4.safetensors [425952fe]
- deliberate_v2.safetensors [10ec4b29]
- deliberate_v3.safetensors [afd9d2d4]
- dreamlike-anime-1.0.safetensors [4520e090]
- dreamlike-diffusion-1.0.safetensors [5c9fd6e0]
- dreamlike-photoreal-2.0.safetensors [fdcf65e7]
- dreamshaper_6BakedVae.safetensors [114c8abb]
- dreamshaper_7.safetensors [5cf5ae06]
- dreamshaper_8.safetensors [9d40847d]
- edgeOfRealism_eorV20.safetensors [3ed5de15]
- EimisAnimeDiffusion_V1.ckpt [4f828a15]
- elldreths-vivid-mix.safetensors [342d9d26]
- epicphotogasm_xPlusPlus.safetensors [1a8f6d35]
- epicrealism_naturalSinRC1VAE.safetensors [90a4c676]
- epicrealism_pureEvolutionV3.safetensors [42c8440c]
- ICantBelieveItsNotPhotography_seco.safetensors [4e7a3dfd]
- indigoFurryMix_v75Hybrid.safetensors [91208cbb]
- juggernaut_aftermath.safetensors [5e20c455]
- lofi_v4.safetensors [ccc204d6]
- lyriel_v16.safetensors [68fceea2]
- majicmixRealistic_v4.safetensors [29d0de58]
- mechamix_v10.safetensors [ee685731]
- meinamix_meinaV9.safetensors [2ec66ab0]
- meinamix_meinaV11.safetensors [b56ce717]
- neverendingDream_v122.safetensors [f964ceeb]
- openjourney_V4.ckpt [ca2f377f]
- pastelMixStylizedAnime_pruned_fp16.safetensors [793a26e8]
- portraitplus_V1.0.safetensors [1400e684]
- protogenx34.safetensors [5896f8d5]
- Realistic_Vision_V1.4-pruned-fp16.safetensors [8d21810b]
- Realistic_Vision_V2.0.safetensors [79587710]
- Realistic_Vision_V4.0.safetensors [29a7afaa]
- Realistic_Vision_V5.0.safetensors [614d1063]
- redshift_diffusion-V10.safetensors [1400e684]
- revAnimated_v122.safetensors [3f4fefd9]
- rundiffusionFX25D_v10.safetensors [cd12b0ee]
- rundiffusionFX_v10.safetensors [cd4e694d]
- sdv1_4.ckpt [7460a6fa]
- v1-5-pruned-emaonly.safetensors [d7049739]
- v1-5-inpainting.safetensors [21c7ab71]
- shoninsBeautiful_v10.safetensors [25d8c546]
- theallys-mix-ii-churned.safetensors [5d9225a4]
- timeless-1.0.ckpt [7c4971d4]
- toonyou_beta6.safetensors [980f6b15]
Download Tools
Download from Twitter
const { twdl } = require('globalsprak');
async function main() {
const url = "https://twitter.com/example/status/12345";
const response = await twdl(url);
console.log("Twitter Download Response:", response);
}
main();
Download from Facebook
const { fbdl } = require('globalsprak');
async function main() {
const url = "https://www.facebook.com/example/video/12345";
const response = await fbdl(url);
console.log("Facebook Download Response:", response);
}
main();
Download from TikTok
const { tkdl } = require('globalsprak');
async function main() {
const url = "https://www.tiktok.com/example/video/12345";
const response = await tkdl(url);
console.log("TikTok Download Response:", response);
}
main();
Download from Google Drive
const { drdl } = require('globalsprak');
async function main() {
const url = "";
const response = await drdl(url);
console.log("Google Drive Download Response:", response);
}
main();
Download from Instagram
const { instadl } = require('globalsprak');
async function main() {
const url = "https://www.instagram.com/p/12345";
const response = await instadl(url);
console.log("Instagram Download Response:", response);
}
main();
YouTube Download
const { ytdl } = require('globalsprak');
async function main() {
const url = "https://www.youtube.com/watch?v=12345";
const response = await ytdl(url);
console.log("YouTube Download Response:", response);
}
main();
Spotify Download
Function:
spdl(url)
Description: Downloads content from Spotify using the provided URL.
Example:
const { spdl } = require('globalsprak'); async function main() { const url = "https://open.spotify.com/track/123456"; const response = await spdl(url); console.log("Spotify Download Response:", response); } main();
AllDL
- Function:
alldl(url)
- Description: Downloads content from various platforms using the provided URL.
- Example:
const { alldl } = require('globalsprak'); async function main() { const url = "https://example.com/media"; const response = await alldl(url); console.log("AllDL Response:", response); } main();
- Function:
Search Utilities
Pinterest Search
const { pinterest } = require('globalsprak');
async function main() {
const query = "nature";
const count = 10;
const response = await pinterest(query, count);
console.log("Pinterest Search Response:", response);
}
main();
Spotify Search
const { spsearch } = require('globalsprak');
async function main() {
const query = "Adele";
const response = await spsearch(query);
console.log("Spotify Search Response:", response);
}
main();
YouTube Search
const { ytsearch } = require('globalsprak');
async function main() {
const query = "JavaScript tutorials";
const response = await ytsearch(query);
console.log("YouTube Search Response:", response);
}
main();
TikTok Search
- Function:
tiksearch(query)
- Description: Search for TikTok videos based on a query.
- Example:
const { tiksearch } = require('globalsprak'); async function main() { const query = "dance"; const response = await tiksearch(query); console.log("TikTok Search Response:", response); } main();
Wallpaper Search
Function:
wallpaper(query, count)
Description: Search for wallpapers based on a query and number of results.
Example:
const { wallpaper } = require('globalsprak'); async function main() { const query = "nature"; const count = 5; const response = await wallpaper(query, count); console.log("Wallpaper Search Response:", response); } main();
Shoti (TikTok Download)
Function:
shoti()
Description: Fetches TikTok videos using the Shoti API.
Example:
const { shoti } = require('globalsprak'); async function main() { const response = await shoti(); console.log("ShotI Response:", response); } main();
Pexels Search
Function:
pxsearch(query, count)
Description: Searches for images on Pexels based on the specified query and returns a specified number of results.
Parameters:
query
: The search term.count
: The number of results to return.
Example:
const { pxsearch } = require('globalsprak'); async function main() { const query = "nature"; const count = 5; const response = await pxsearch(query, count); console.log("Pexels Search Response:", response); } main();
Waifu Search
Specific Waifu Search
const { waifusearch } = require('globalsprak');
async function main() {
const name = "Naruto";
const response = await waifusearch(name);
console.log("Waifu Search Response:", response);
}
main();
Random Waifu
const { waifu } = require('globalsprak');
async function main() {
const response = await waifu();
console.log("Random Waifu Response:", response);
}
main();
Movie Information Categories
Movie Info
- Function:
movieinfo(name)
- Description: Get detailed information about a movie by its title.
- Example:
const { movieinfo } = require('globalsprak'); async function main() { const name = "Inception"; const response = await movieinfo(name); console.log("Movie Info Response:", response); } main();
Movie Info Version 2
Function:
movieinfov2(id)
Description: Get information about a movie using its ID.
Example:
const { movieinfov2 } = require('globalsprak'); async function main() { const id = "12345"; const response = await movieinfov2(id); console.log("Movie Info V2 Response:", response); } main();
Country Information
- Function:
countryinfo(name)
- Description: Get detailed information about a country by its name.
- Example:
const { countryinfo } = require('globalsprak'); async function main() { const name = "India"; const response = await countryinfo(name); console.log("Country Info Response:", response); } main();
- Function:
Translate
- Function:
translate(text, lang)
- Description: Translates the provided text into the specified language using the API.
- Example:
const { translate } = require('globalsprak'); async function main() { const text = "Hello, world!"; const lang = "es"; // Spanish const response = await translate(text, lang); console.log("Translation:", response); } main();
Lyrics
- Function:
lyrics(songName)
- Description: Fetches the lyrics for a specific song using the provided song name.
- Example:
const { lyrics } = require('globalsprak'); async function main() { const songName = "Bohemian Rhapsody"; const response = await lyrics(songName); console.log("Lyrics:", response); } main();
TikStalk
- Function:
tikstalk(username)
- Description: Fetches TikTok user profile information using the provided username.
- Example:
const { tikstalk } = require('globalsprak'); async function main() { const username = "user123"; const response = await tikstalk(username); console.log("TikStalk Data:", response); } main();
TempMail (Generate Email)
- Function:
tempmailGet()
- Description: Generates a temporary email address.
- Example:
const { tempmailGet } = require('globalsprak'); async function main() { const response = await tempmailGet(); console.log("Temporary Email:", response); } main();
TempMail (Inbox)
- Function:
tempmailInbox(email)
- Description: Fetches the inbox for a generated temporary email address.
- Example:
const { tempmailInbox } = require('globalsprak'); async function main() { const email = "[email protected]"; const response = await tempmailInbox(email); console.log("Inbox:", response); } main();
Quiz (Beta)
- Function:
quiz(category)
- Description: Fetches quiz questions based on the provided category.
- Categories:
📚 𝗚𝗲𝗻𝗲𝗿𝗮𝗹
➜ english
➜ math
➜ physics
➜ chemistry
➜ history
➜ philosophy
➜ random
➜ science
🖥 𝗣𝗿𝗼𝗴𝗿𝗮𝗺𝗺𝗶𝗻𝗴
➜ coding
➜ javascript
➜ html
➜ java
➜ ruby
➜ python
➜ css
➜ c
➜ c-plus
➜ php
➜ xml
➜ typescript
➜ nodejs
➜ express
🎲 𝗚𝗮𝗺𝗲
➜ minecraft
➜ freefire
➜ roblox
➜ pubg
➜ gta-v
➜ fortnite
🛸 𝗢𝘁𝗵𝗲𝗿
➜ music
➜ youtuber
➜ space
➜ animal
➜ food
➜ country
➜ electronic
➜ sports
🎀 𝗔𝗻𝗶𝗺𝗲
➜ demonslayer
➜ doraemon
➜ anime
➜ one-piece
➜ naruto
➜ deathnote
➜ dragon-ball
➜ attack-on-titan
🌐 𝗟𝗮𝗻𝗴𝘂𝗮𝗴𝗲𝘀
➜ hindi
➜ english
➜ french
➜ filipino
➜ spanish
➜ bengali
➜ vietnamese
➜ japanese
Example Usage:
const { quiz } = require('globalsprak');
async function main() {
const category = "science";
const response = await quiz(category);
console.log("Quiz Data:", response);
}
main();
🥳 Soon I will add more categories and features.
Album (Beta)
- Function:
album(category)
- Description: Fetches an album based on the provided category.
- Categories:
➨ 1. English
➨ 2. Anime
➨ 3. Hindi
➨ 4. Free Fire
➨ 5. Football
Soon I will add more album categories.
Example Usage:
const { album } = require('globalsprak');
async function main() {
const category = "Anime";
const response = await album(category);
console.log("Album Data:", response);
}
main();
Weather
Get a response from the Weather API based on your City name,
const { weather } = require('globalsprak');
async function main() {
const city = "Nahan";
const response = await weather(city);
console.log("Weather Response:", response);
}
main();
Error Handling
Each function has built-in error handling. If an error occurs during the API request, an error message will be logged, and null
will be returned as the response. Example:
const { gpt } = require('globalsprak');
async function main() {
try {
const response = await gpt("Explain AI");
if (response) {
console.log("GPT Response:", response);
} else {
console.error("Failed to fetch GPT response.");
}
} catch (error) {
console.error("An error occurred:", error);
}
}
main();
API Reference
| Function | Description | Parameters |
|----------------|-------------------------------------------------------|---------------------------------------|
| gpt
| Get a response from GPT | prompt
|
| emi
| Calculate EMI based on a prompt | prompt
|
| prodia
| Generate an image based on a text prompt and model | prompt
, model
|
| llama
| Get a response from the Llama model | prompt
|
| mixtral
| Get a response from the Mixtral model | prompt
|
| coral
| Chat with Coral | prompt
|
| gptweb
| Get web-enhanced GPT responses | prompt
|
| chatgpt
| Get a response from ChatGPT | prompt
|
| coralchat
| Chat with Coral using a specific user ID | prompt
, uid
|
| coralreset
| Reset Coral conversation for a specific user | uid
|
| alldl
| Download from any supported URL | url
|
| twdl
| Download media from Twitter | url
|
| fbdl
| Download media from Facebook | url
|
| tkdl
| Download media from TikTok | url
|
| drdl
| Download media from Dailymotion | url
|
| instadl
| Download media from Instagram | url
|
| ytdl
| Download media from YouTube | url
|
| spdl
| Download media from Spotify | url
|
| pinterest
| Search for images on Pinterest | query
, count
|
| spsearch
| Search for tracks on Spotify | query
|
| ytsearch
| Search for videos on YouTube | query
|
| pxsearch
| Search for images on Pexels | query
, count
|
| wallpaper
| Search for wallpapers | query
, count
|
| tiksearch
| Search for TikTok videos | query
|
| movieinfo
| Get detailed information about a movie | name
|
| movieinfov2
| Get information about a movie using its ID | id
|
| countryinfo
| Retrieve information about a specific country | name
|
| waifusearch
| Find images of characters based on names | name
|
| waifu
| Get a random waifu image | - |
Conclusion
This package is designed to be easy to use and flexible, making it a great choice for integrating AI, media, and utility functions into your applications. For any issues or feature requests, please open an issue in the repository.