https://github.com/jacoblincool/nai-studio
NovelAI Library and Command Line Interface.
https://github.com/jacoblincool/nai-studio
Last synced: over 1 year ago
JSON representation
NovelAI Library and Command Line Interface.
- Host: GitHub
- URL: https://github.com/jacoblincool/nai-studio
- Owner: JacobLinCool
- License: mit
- Created: 2022-10-20T14:12:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T05:50:53.000Z (over 2 years ago)
- Last Synced: 2025-01-24T23:41:26.340Z (over 1 year ago)
- Language: TypeScript
- Size: 83 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NAI Studio
NovelAI Library and Command Line Interface.
> DISCLAIMER: This is not an official NovelAI product. This is a community project.
```sh
NOVEL_AI_TOKEN=YOUR_TOKEN nai "school uniform, purple eyes" -n "nsfw" -w 640 -h 640
```
> You can also save your token in the `.env` file, it will be loaded automatically.
```ts
import { NovelAI, resolution } from "nai-studio";
import fs from "node:fs";
(async () => {
const nai = new NovelAI("YOUR_TOKEN");
const image = await nai.image("prompt", "", { ...resolution.normal.portrait });
fs.writeFileSync("image.png", image);
})();
```