{"id":22677800,"url":"https://github.com/datamonet/sd-webui-api","last_synced_at":"2025-09-11T11:38:45.117Z","repository":{"id":176578187,"uuid":"656187816","full_name":"datamonet/sd-webui-api","owner":"datamonet","description":"A Typescript API client for AUTOMATIC111/stable-diffusion-webui","archived":false,"fork":false,"pushed_at":"2023-10-18T07:53:20.000Z","size":290,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-31T01:22:21.665Z","etag":null,"topics":["automatic1111","stable-diffusion","typescript","webui"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/sd-webui-api","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datamonet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-20T12:33:13.000Z","updated_at":"2025-06-03T07:50:13.000Z","dependencies_parsed_at":"2025-04-12T14:48:43.351Z","dependency_job_id":null,"html_url":"https://github.com/datamonet/sd-webui-api","commit_stats":null,"previous_names":["datamonet/sd-webui-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/datamonet/sd-webui-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datamonet%2Fsd-webui-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datamonet%2Fsd-webui-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datamonet%2Fsd-webui-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datamonet%2Fsd-webui-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datamonet","download_url":"https://codeload.github.com/datamonet/sd-webui-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datamonet%2Fsd-webui-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274626891,"owners_count":25320295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automatic1111","stable-diffusion","typescript","webui"],"created_at":"2024-12-09T18:01:55.426Z","updated_at":"2025-09-11T11:38:45.082Z","avatar_url":"https://github.com/datamonet.png","language":"TypeScript","readme":"## About\nA Typescript API client for [AUTOMATIC111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui).\n\n## Installation\n\n```bash\nnpm install sd-webui-api\n```\n\n```bash\nyarn add sd-webui-api\n```\n\n## Usage\n\n### SD WebUI API Backend\n\nYou need to have a SD WebUI API backend to use this package. Check out [SD WebUI API Doc](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/API) to start a local API backend first and the default URL for API endpoint is: http://127.0.0.1:7860\n\nSimple initialization with all default settings:\n\n```typescript\nconst api = new StableDiffusionApi({\n  baseUrl: 'http://127.0.0.1:7860', // or other WebUI url\n})\n```\nInitialization with custom parameters:\n\n```typescript\nconst api = new StableDiffusionApi({\n  host: \"http://127.0.0.1:7860\",\n  port: 7860,\n  protocol: \"http\",\n  defaultSampler: \"Euler a\",\n  defaultStepCount: 20,\n})\n```\n\n### Authentication\n\nUse the `--api-auth` command line argument with \"username:password\" on the server to enable API authentication.\n\n```typescript\napi.setAuth(\"username\", \"password\")\n```\n\n### txt2img\n\n```typescript\nconst result = await api.txt2img({\n    prompt: \"a black cat\",\n    ...\n})\n```\n\n### img2img\n\nTBA\n\n### ControlNet \n\nTBA\n\n## Acknowledgment\n\nThis project is based off https://github.com/jaschahuisman/sd-api.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatamonet%2Fsd-webui-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatamonet%2Fsd-webui-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatamonet%2Fsd-webui-api/lists"}