-
copy the vyroai folder into your project
-
then, scroll down to
get-your-token
to obtain your vyro.ai token -
after that, it's really really really easy to use. you can reference the function with the following:
const { generateImage } = require('./vyroai/imagine.js');
and generate an image with
await generateImage("beautiful girl", "16:9", "ANIME_V2");
there are additional examples in the ./examples folder (upscale, interrogator, etc.)
you'll need your vyro.ai token to use this. don't worry, afaik there are no limits on your token.
to get your token,
- navigate to https://imagine.art, and open developer tools. (
Ctrl + Shift + I
in most browsers) - go to the console, paste this handy dandy script, and press enter:
const token = localStorage.getItem('token');
if (token) {
const tempInput = document.createElement('input');
tempInput.value = token;
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand('copy');
document.body.removeChild(tempInput);
console.log('%cDone!', 'font-size: 50px; color: red;');
console.log(`%cYou now have your token in the clipboard!`, 'font-size: 16px; color: red;');
console.log(`%cDidn't work? Copy it manually: ${token}`, 'font-size: 13px; color: red;');
} else {
console.log('%cToken not found in localStorage. Please login/signup, then try again.', 'font-size: 24px; color: red;');
}
- rename
.env.example
to.env
, and set the value to whatever was copied to your clipboard.
it's worth noting that bearer's expire 24h after creation. i will be trying to remove the need to input a bearer at all in the near future.
- remove the need to use bearer at all
- add variate (img2img)
add remix a.k.a. controlnet (img & text 2 img)make image generation return image data instead of directly downloadingadd interrogator (img2text)add upscale (img2img)
- vyro.ai for the api (duh)