{
  "manifest_version": "1.0.0",
  "template": {
    "id": "bac47af9-26cd-447c-8f3b-beb725dc3deb",
    "slug": "9router-ai-gateway",
    "name": "9Router — Self-Hosted AI Gateway for 60+ Providers",
    "description": "Route Claude Code & Cursor to 60+ LLM providers with fallback",
    "url": "https://railway.com/deploy/9router-ai-gateway",
    "upstream": {
      "image": "decolua/9router:latest"
    }
  },
  "services": [
    {
      "name": "9Router",
      "source": {
        "image": "decolua/9router:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "9Router",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "20128"
    },
    {
      "key": "DATA_DIR",
      "service": "9Router",
      "description": "Provide a value for DATA_DIR.",
      "secret": false,
      "strategy": "default",
      "default": "/app/data"
    },
    {
      "key": "NODE_ENV",
      "service": "9Router",
      "description": "Provide a value for NODE_ENV.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "CLOUD_URL",
      "service": "9Router",
      "description": "Provide a value for CLOUD_URL.",
      "secret": false,
      "strategy": "default",
      "default": "https://9router.com"
    },
    {
      "key": "JWT_SECRET",
      "service": "9Router",
      "description": "Provide a value for JWT_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "API_KEY_SECRET",
      "service": "9Router",
      "description": "Provide a value for API_KEY_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MACHINE_ID_SALT",
      "service": "9Router",
      "description": "Provide a value for MACHINE_ID_SALT.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "INITIAL_PASSWORD",
      "service": "9Router",
      "description": "Provide a value for INITIAL_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "NEXT_PUBLIC_BASE_URL",
      "service": "9Router",
      "description": "Provide a value for NEXT_PUBLIC_BASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_CLOUD_URL",
      "service": "9Router",
      "description": "Provide a value for NEXT_PUBLIC_CLOUD_URL.",
      "secret": false,
      "strategy": "default",
      "default": "https://9router.com"
    },
    {
      "key": "OBSERVABILITY_ENABLED",
      "service": "9Router",
      "description": "Provide a value for OBSERVABILITY_ENABLED.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "9router-ai-gateway"
      }
    },
    "cli": "railway deploy --template 9router-ai-gateway",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "bac47af9-26cd-447c-8f3b-beb725dc3deb",
            "serializedConfig": {
              "services": {
                "c68692d3-f132-43ba-bfa5-fe64fdb8e828": {
                  "icon": "https://raw.githubusercontent.com/codestorm-official/9router-v3/refs/heads/master/frontend/public/branding/9router-v3-logo.png",
                  "name": "9Router",
                  "source": {
                    "image": "decolua/9router:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "20128"
                    },
                    "DATA_DIR": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "/app/data"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "production"
                    },
                    "CLOUD_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "https://9router.com"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "API_KEY_SECRET": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{API_KEY_SECRET}}"
                    },
                    "MACHINE_ID_SALT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{MACHINE_ID_SALT}}"
                    },
                    "INITIAL_PASSWORD": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{INITIAL_PASSWORD}}"
                    },
                    "NEXT_PUBLIC_BASE_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_CLOUD_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "https://9router.com"
                    },
                    "OBSERVABILITY_ENABLED": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:20128": {
                        "port": 20128
                      }
                    }
                  },
                  "volumeMounts": {
                    "c68692d3-f132-43ba-bfa5-fe64fdb8e828": {
                      "mountPath": "/app/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T05:13:53.102Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_45fe54b0cd4442f88e63",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 35,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "9Router"
  }
}
