{"id":14006922,"url":"https://github.com/JacobLinCool/sdxl-api","last_synced_at":"2025-07-24T00:32:29.025Z","repository":{"id":208311695,"uuid":"720858686","full_name":"JacobLinCool/sdxl-api","owner":"JacobLinCool","description":"SDXL API provides a seamless interface for image generation and retrieval using Stable Diffusion XL integrated with Cloudflare AI Workers. This API allows users to generate and manage images in a highly efficient and scalable manner.","archived":false,"fork":false,"pushed_at":"2024-02-29T08:06:09.000Z","size":203,"stargazers_count":15,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-07T05:28:57.729Z","etag":null,"topics":["cloudflare-workers","stable-diffusion"],"latest_commit_sha":null,"homepage":"","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/JacobLinCool.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}},"created_at":"2023-11-19T20:08:34.000Z","updated_at":"2025-05-06T07:57:30.000Z","dependencies_parsed_at":"2024-02-29T09:25:45.690Z","dependency_job_id":"052b7fb9-6b2e-4978-b2c6-a4327fe533ca","html_url":"https://github.com/JacobLinCool/sdxl-api","commit_stats":null,"previous_names":["jacoblincool/sdxl-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JacobLinCool/sdxl-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fsdxl-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fsdxl-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fsdxl-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fsdxl-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JacobLinCool","download_url":"https://codeload.github.com/JacobLinCool/sdxl-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fsdxl-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266774778,"owners_count":23982246,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["cloudflare-workers","stable-diffusion"],"created_at":"2024-08-10T10:01:42.910Z","updated_at":"2025-07-24T00:32:28.759Z","avatar_url":"https://github.com/JacobLinCool.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# SDXL API\n\nSDXL API provides a seamless interface for image generation and retrieval using Stable Diffusion XL integrated with Cloudflare AI Workers. This API allows users to generate and manage images in a highly efficient and scalable manner.\n\n![openapi](image/openapi.png)\n\n## Features\n\n-   **Image Generation:** Generate images from text prompts with customizable steps.\n-   **Image Retrieval:** Retrieve generated images and their configurations. (opt-in with R2 binding)\n\n## Usage\n\nI recommend to use this as an [Service Binding](https://developers.cloudflare.com/workers/configuration/bindings/about-service-bindings/), and use Cloudflare Zero Trust to protect the Swagger UI. By this way, your other applications and still access the service with Service Binding, while the Swagger UI (and the whole API) is protected by Cloudflare Zero Trust and only you (and the one you trust) can access it.\n\n### Service Binding\n\nYou can use [the library](./packages/sdxl-api/) to interact with the service binding.\n\n```toml\n# add this to downstream worker's wrangler.toml\n[[services]]\nbinding = \"sdxl\"\nservice = \"sdxl-api-worker\"\n```\n\n```ts\nimport { sdxl } from \"sdxl-api\";\n\nexport default {\n\tasync fetch(request, env) {\n\t\t// setup the SDXL instance, bind to the service\n\t\tsdxl.setup({ fetcher: env.sdxl });\n\n\t\t// generate an image\n\t\tconst [image] = await sdxl.generate(\n\t\t\t\"A colorful deep space nebula on a black background.\",\n\t\t\t12,\n\t\t);\n\n\t\t// ...\n\t},\n};\n```\n\n## Contributions\n\nYour contributions and suggestions are heartily welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJacobLinCool%2Fsdxl-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJacobLinCool%2Fsdxl-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJacobLinCool%2Fsdxl-api/lists"}