1.1.1 • Published 2 years ago

novelai v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

npm version License: MIT npm

novelAI SDK for Typescript

šŸ  Homepage

Install

npm i novelai
yarn add novelai

Run tests

yarn test

Usage

import fs from "fs";
import { NovelAi } from "novelai";

async function main() {
    const novelAi = new NovelAi();
    const accessToken = await (
        await novelAi.login("email", "password")
    ).accessToken;
    const data = await novelAi.generateImage(accessToken, {
        input: "masterpiece",
        model: "safe",
        resolution: "landscape",
        sampling: "k_euler_ancestral",
        seed: 1,
    });
    const buffer = Buffer.from(data.imageBase64, "base64");
    fs.writeFileSync("new-path.jpg", buffer);
    console.log("done");
}

main();

Author

šŸ‘¤ CuteWisp sweatpotato13@gmail.com

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ā­ļø if this project helped you!

1.1.1

2 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago