{
  "manifest_version": "1.0.0",
  "template": {
    "id": "0b89801b-8d6a-47fc-98c0-ad8c34b7949b",
    "slug": "nsfw-api",
    "name": "NSFW API",
    "description": "Self-hosted image moderation API: nudity, weapons, gore and drugs.",
    "url": "https://railway.com/deploy/nsfw-api",
    "upstream": {
      "repo_url": "https://github.com/openinary/nsfw-api"
    }
  },
  "services": [
    {
      "name": "nsfw-api",
      "source": {
        "repo": "https://github.com/openinary/nsfw-api"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "nsfw-api",
      "description": "Port the API listens on. Keep 8080: the public domain points to it.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "API_KEY",
      "service": "nsfw-api",
      "description": "Key required on /classify (Bearer or x-api-key). Generated for you; clear it for an open API.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "NSFW_CLASSES",
      "service": "nsfw-api",
      "description": "Classes summed into the nudity score. Use Porn,Hentai to tolerate suggestive images.",
      "secret": false,
      "strategy": "default",
      "default": "Porn,Hentai,Sexy"
    },
    {
      "key": "CLIP_THRESHOLD",
      "service": "nsfw-api",
      "description": "Score (0 to 1) above which a weapon, gore or drugs category is flagged.",
      "secret": false,
      "strategy": "default",
      "default": "0.5"
    },
    {
      "key": "NSFW_THRESHOLD",
      "service": "nsfw-api",
      "description": "Nudity score (0 to 1) above which an image is flagged as nsfw.",
      "secret": false,
      "strategy": "default",
      "default": "0.7"
    },
    {
      "key": "CLIP_CATEGORIES",
      "service": "nsfw-api",
      "description": "Extra categories checked with MobileCLIP: weapon, gore, drugs. Set to none to turn them off.",
      "secret": false,
      "strategy": "default",
      "default": "weapon,gore,drugs"
    },
    {
      "key": "MAX_FILE_SIZE_MB",
      "service": "nsfw-api",
      "description": "Maximum upload size, in MB.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "nsfw-api"
      }
    },
    "cli": "railway deploy --template nsfw-api",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "0b89801b-8d6a-47fc-98c0-ad8c34b7949b",
            "serializedConfig": {
              "services": {
                "60361426-9294-4e77-b4e1-be8f60e80ed6": {
                  "name": "nsfw-api",
                  "source": {
                    "repo": "openinary/nsfw-api"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the API listens on. Keep 8080: the public domain points to it.",
                      "defaultValue": "8080"
                    },
                    "API_KEY": {
                      "isOptional": true,
                      "description": "Key required on /classify (Bearer or x-api-key). Generated for you; clear it for an open API.",
                      "defaultValue": "{{API_KEY}}"
                    },
                    "NSFW_CLASSES": {
                      "description": "Classes summed into the nudity score. Use Porn,Hentai to tolerate suggestive images.",
                      "defaultValue": "Porn,Hentai,Sexy"
                    },
                    "CLIP_THRESHOLD": {
                      "description": "Score (0 to 1) above which a weapon, gore or drugs category is flagged.",
                      "defaultValue": "0.5"
                    },
                    "NSFW_THRESHOLD": {
                      "description": "Nudity score (0 to 1) above which an image is flagged as nsfw.",
                      "defaultValue": "0.7"
                    },
                    "CLIP_CATEGORIES": {
                      "description": "Extra categories checked with MobileCLIP: weapon, gore, drugs. Set to none to turn them off.",
                      "defaultValue": "weapon,gore,drugs"
                    },
                    "MAX_FILE_SIZE_MB": {
                      "description": "Maximum upload size, in MB.",
                      "defaultValue": "10"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-10-17T16:14:42.276Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-17T15:01:58.416Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_fe787911e4a744a5aba5",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 129,
    "typical_build_seconds": 71,
    "typical_start_seconds": 10,
    "slowest_service": "nsfw-api"
  }
}
