{"id":16106971,"url":"https://github.com/tohrusky/telgalereya","last_synced_at":"2025-09-11T23:32:09.082Z","repository":{"id":193800087,"uuid":"689509288","full_name":"Tohrusky/TelGalereya","owner":"Tohrusky","description":"ТелГалерея: a RESTful API for image hosting with Cloudflare Workers.","archived":false,"fork":false,"pushed_at":"2023-12-11T11:04:24.000Z","size":604,"stargazers_count":10,"open_issues_count":25,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-28T17:52:40.181Z","etag":null,"topics":["cloud-functions","cloudflare","cloudflare-workers","docker","image-hosting","machine-learning","nsfwjs","sensitive-word-filter","serverless","telegram","tensorflowjs","typescript"],"latest_commit_sha":null,"homepage":"https://img-worker-nsfw.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tohrusky.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}},"created_at":"2023-09-10T03:11:42.000Z","updated_at":"2024-07-23T15:26:43.000Z","dependencies_parsed_at":"2023-09-10T05:35:10.168Z","dependency_job_id":null,"html_url":"https://github.com/Tohrusky/TelGalereya","commit_stats":null,"previous_names":["tohrusky/tgimg-worker","tohrusky/img-worker"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tohrusky%2FTelGalereya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tohrusky%2FTelGalereya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tohrusky%2FTelGalereya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tohrusky%2FTelGalereya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tohrusky","download_url":"https://codeload.github.com/Tohrusky/TelGalereya/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232670312,"owners_count":18558568,"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","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":["cloud-functions","cloudflare","cloudflare-workers","docker","image-hosting","machine-learning","nsfwjs","sensitive-word-filter","serverless","telegram","tensorflowjs","typescript"],"created_at":"2024-10-09T19:14:51.063Z","updated_at":"2025-01-06T03:37:37.614Z","avatar_url":"https://github.com/Tohrusky.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ТелГалерея\n\n`ТелГалерея` is a Cloudflare Workers service for image hosting.\nIt uses Telegraph's file API and provides a simple Reverse Proxy for it.\nTo use `ТелГалерея`, deploy it to Cloudflare Workers using the provided deployment button.\nThen use `Custom Domains` to bind your own domain name.\n\nBy Set Enviroment Variables in [config](packages/img-worker/wrangler.toml), you can enable the NSFW Detector. See [@img-worker/nsfw](./packages/nsfw/README.md) for more details.\n\n[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/Tohrusky/TelGalereya)\n\n## API Endpoint `/api/v1`\n\n### `/upload` - Upload an Image\n\n#### Request\n\n- Method: POST\n- Content-Type: multipart/form-data\n- Parameters:\n  - `file` (single file) - The image file to upload.\n\n#### Response\n\nThe response is in protobuf3 format and has the following structure:\n\n```protobuf\nmessage UploadResponse {\n  string status = 1;\n  string message = 2;\n  ImageResponse data = 3;\n}\n\nmessage ImageResponse {\n  string origin_img = 1;\n  string img = 2;\n}\n```\n\n- `status` (string): The status of the upload operation. Possible values are \"success\" or \"error\".\n- `message` (string): A message providing information about the upload operation.\n- `data` (ImageResponse): An optional field containing the uploaded image URLs.\n\n#### Example Response (Success):\n\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"Upload success!\",\n  \"data\": {\n    \"origin_img\": \"https://telegra.ph/file/a5418e5f4313b65fba5b8.png\",\n    \"img\": \"https://xx.114514.org/image/YTU0MThlNWY0MzEzYjY1ZmJhNWI4LnBuZw==\"\n  }\n}\n```\n\n### `/nsfw-check` - Check if an Image is NSFW\n\n#### Request\n\n- Method: GET\n- Query Parameters:\n  - `url` (string) - The image URL to check.\n\n#### Response\n\nThe response is in protobuf3 format and has the following structure:\n\n```protobuf\nmessage NSFWCheckResponse {\n    string status = 1;\n    string message = 2;\n    string url = 3;\n    string sensitive = 4;\n    bool nsfw = 4;\n    NSFWScore score = 5;\n}\n\nmessage NSFWScore {\n    double drawing = 1;\n    double hentai = 2;\n    double neutral = 3;\n    double sexy = 4;\n    double porn = 5;\n}\n```\n\n- `status` (string): The status of the check operation. Possible values are \"success\" or \"error\".\n- `message` (string): A message providing information about the check operation.\n- `nsfw` (bool): Whether the image is NSFW. When the value is `true`, the image is NSFW.\n\n#### Example Response (Success):\n\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"NSFW content: Sexy\",\n  \"url\": \"https://telegra.ph/file/1145141919810.png\",\n  \"sensitive\": \"null\",\n  \"nsfw\": true,\n  \"score\": {\n    \"drawing\": 0.00007909037958597764,\n    \"hentai\": 0.0010020226472988725,\n    \"neutral\": 0.21883316338062286,\n    \"sexy\": 0.003355648135766387,\n    \"porn\": 0.7767300605773926\n  }\n}\n```\n\n## License\n\nThis project is licensed under the BSD 3-Clause - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftohrusky%2Ftelgalereya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftohrusky%2Ftelgalereya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftohrusky%2Ftelgalereya/lists"}