{"id":37093417,"url":"https://github.com/shitpostingio/nsfw-microservice","last_synced_at":"2026-01-14T11:21:39.828Z","repository":{"id":132651072,"uuid":"326433497","full_name":"shitpostingio/nsfw-microservice","owner":"shitpostingio","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-25T05:13:29.000Z","size":9582,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-06-21T06:32:28.767Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/shitpostingio.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}},"created_at":"2021-01-03T15:04:30.000Z","updated_at":"2021-01-03T16:22:29.000Z","dependencies_parsed_at":"2023-05-03T14:34:46.735Z","dependency_job_id":null,"html_url":"https://github.com/shitpostingio/nsfw-microservice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shitpostingio/nsfw-microservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shitpostingio%2Fnsfw-microservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shitpostingio%2Fnsfw-microservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shitpostingio%2Fnsfw-microservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shitpostingio%2Fnsfw-microservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shitpostingio","download_url":"https://codeload.github.com/shitpostingio/nsfw-microservice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shitpostingio%2Fnsfw-microservice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28418272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-14T11:21:38.990Z","updated_at":"2026-01-14T11:21:39.820Z","avatar_url":"https://github.com/shitpostingio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NSFW Microservice\n\nREST-powered microservice for analyzing media and returning NSFW scores.\nThe repository also contains a client to perform requests to the service.\n\nIt is important to notice that this service provides no support for authentication or caching. It is also completely stateless, making it ideal to be used in the backend. A possible \"frontend\" implementation can be found in [Analysis API](https://gitlab.com/shitposting/analysis-api).\n\n## Endpoints\n\n- Image endpoint: `\u003cbind-address\u003e/nsfw/image`\n- Video endpoint: `\u003cbind-address\u003e/nsfw/video`\n- Health check: `\u003cbind-address\u003e/healthy`\n\n## Returned data\n\nThe data returned by the server is in the form:\n\n```go\ntype Analysis struct {\n    Fingerprint            FingerprintResponse\n    NSFW                   NSFWResponse\n    FingerprintErrorString string\n    NSFWErrorString        string\n}\n\n```\n\nThe client trims off the unnecessary data and returns:\n\n```go\ntype NSFWResponse struct {\n    IsNSFW     bool\n    Confidence float64\n    Label      string\n}\n```\n\n## Environment options\n\n- Service bind address and port: `NSFW_BIND_ADDRESS` (defaults to `localhost:10001`).\n- Path to configuration file: `NSFW_CFG_PATH` (defaults to `config.toml`).\n- Recognition service to use: `NSFW_TYPE`. Currently supported values are `t` (Tensorflow, default) and `c` (Cloudmersive).\n- Max size for image files: `NSFW_MAX_IMAGE_SIZE` (defaults to `10 \u003c\u003c 20`, 10 MB).\n- Max size for video files: `NSFW_MAX_VIDEO_SIZE` (defaults to `20 \u003c\u003c 20`, 20 MB).\n\n## Configuration file structure\n\n```toml\n[cloudmersive]\n  apiendpoint = \"https://api.cloudmersive.com/image/nsfw/classify\"\n  apikey = \u003cyour-cloudmersive-api-key\u003e\n  explicitthreshold = 70\n  racythreshold = 78\n\n[tensorflow]\n  knowledgebasepath = \u003cpath-to-folder-containing-model\u003e\n  hentaiThreshold = 0.90\n  pornThreshold = 0.81\n  sexyThreshold = 0.85\n  overallThreshold = 0.90\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshitpostingio%2Fnsfw-microservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshitpostingio%2Fnsfw-microservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshitpostingio%2Fnsfw-microservice/lists"}