novelai
v1.1.1
Published
novelai SDK with typescript
Downloads
5
Readme
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 [email protected]
- Website: Cutewisp.com
- Github: @sweatpotato13
🤝 Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!