API Client for AUTOMATIC1111/stable-diffusion-webui.
- Easy-to-use API client for Stable Diffusion WebUI
- Supports authentication
- Provides methods to interact with the API
You need to set COMMANDLINE_ARGS=--api on webui-user.sh to enable the API.
See AUTOMATIC1111/stable-diffusion-webui/wiki/API for more information.
npm install @xct007/sdwebui-api-clientimport { SDWebUIClient } from "@xct007/sdwebui-api-client"
const client = new SDWebUIClient({
baseURL: "http://localhost:8080",
// API authentication
// Optional if --api-auth is set
username: "admin",
password: "admin"
})
client.api.memory()
.then(console.log)
.catch(console.error).
βββ LICENSE
βββ __tests__
βΒ Β βββ client.test.ts
βΒ Β βββ index.test.ts
βββ eslint.config.mjs
βββ jest.config.ts
βββ jest.setup.ts
βββ package-lock.json
βββ package.json
βββ scripts
βΒ Β βββ build.js
βββ src
βΒ Β βββ client.ts
βΒ Β βββ error.ts
βΒ Β βββ index.ts
βΒ Β βββ sd
βΒ Β βΒ Β βββ index.ts
βΒ Β βΒ Β βββ types.ts
βΒ Β βββ shared.ts
βββ tsc-multi.json
βββ tsconfig.build.json
βββ tsconfig.jsonContributions are welcome! Please open an issue or submit a pull request for any changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or inquiries, please contact itsrose.dev@gmail.com.