{
  "manifest_version": "1.0.0",
  "template": {
    "id": "534afa27-d7fc-4915-a369-298389cbbb67",
    "slug": "hajimi-gemini-api-proxy",
    "name": "hajimi - Gemini API Proxy",
    "description": "OpenAI-compatible Gemini API proxy with key rotation & Vertex AI",
    "url": "https://railway.com/deploy/hajimi-gemini-api-proxy",
    "upstream": {
      "image": "beijixingxing/hajimi:latest"
    }
  },
  "services": [
    {
      "name": "beijixingxing/hajimi:latest",
      "source": {
        "image": "beijixingxing/hajimi:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/hajimi/settings",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for TZ.",
      "secret": false,
      "strategy": "default",
      "default": "Asia/Shanghai"
    },
    {
      "key": "PASSWORD",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SEARCH_MODE",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for SEARCH_MODE.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "WEB_PASSWORD",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for WEB_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ENABLE_VERTEX",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for ENABLE_VERTEX.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "PRECISE_CACHE",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for PRECISE_CACHE.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "RANDOM_STRING",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for RANDOM_STRING.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ENABLE_STORAGE",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for ENABLE_STORAGE.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "FAKE_STREAMING",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for FAKE_STREAMING.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "GEMINI_API_KEYS",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for GEMINI_API_KEYS.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "API_KEY_DAILY_LIMIT",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for API_KEY_DAILY_LIMIT.",
      "secret": true,
      "strategy": "default",
      "default": "100"
    },
    {
      "key": "CONCURRENT_REQUESTS",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for CONCURRENT_REQUESTS.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "MAX_EMPTY_RESPONSES",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for MAX_EMPTY_RESPONSES.",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "RANDOM_STRING_LENGTH",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for RANDOM_STRING_LENGTH.",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "MAX_CONCURRENT_REQUESTS",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for MAX_CONCURRENT_REQUESTS.",
      "secret": false,
      "strategy": "default",
      "default": "3"
    },
    {
      "key": "MAX_REQUESTS_PER_MINUTE",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for MAX_REQUESTS_PER_MINUTE.",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "MAX_REQUESTS_PER_DAY_PER_IP",
      "service": "beijixingxing/hajimi:latest",
      "description": "Provide a value for MAX_REQUESTS_PER_DAY_PER_IP.",
      "secret": false,
      "strategy": "default",
      "default": "600"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "hajimi-gemini-api-proxy"
      }
    },
    "cli": "railway deploy --template hajimi-gemini-api-proxy",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "534afa27-d7fc-4915-a369-298389cbbb67",
            "serializedConfig": {
              "services": {
                "a852e347-feb9-4586-8726-e39cf226157c": {
                  "name": "beijixingxing/hajimi:latest",
                  "source": {
                    "image": "beijixingxing/hajimi:latest"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": true,
                      "defaultValue": "Asia/Shanghai"
                    },
                    "PASSWORD": {
                      "defaultValue": "{{PASSWORD}}"
                    },
                    "SEARCH_MODE": {
                      "isOptional": true,
                      "defaultValue": "false"
                    },
                    "WEB_PASSWORD": {
                      "defaultValue": "{{WEB_PASSWORD}}"
                    },
                    "ENABLE_VERTEX": {
                      "isOptional": true,
                      "defaultValue": "false"
                    },
                    "PRECISE_CACHE": {
                      "isOptional": true,
                      "defaultValue": "false"
                    },
                    "RANDOM_STRING": {
                      "isOptional": true,
                      "defaultValue": "true"
                    },
                    "ENABLE_STORAGE": {
                      "isOptional": true,
                      "defaultValue": "true"
                    },
                    "FAKE_STREAMING": {
                      "isOptional": true,
                      "defaultValue": "true"
                    },
                    "GEMINI_API_KEYS": {
                      "defaultValue": "{{GEMINI_API_KEYS}}"
                    },
                    "API_KEY_DAILY_LIMIT": {
                      "isOptional": true,
                      "defaultValue": "100"
                    },
                    "CONCURRENT_REQUESTS": {
                      "isOptional": true,
                      "defaultValue": "1"
                    },
                    "MAX_EMPTY_RESPONSES": {
                      "isOptional": true,
                      "defaultValue": "5"
                    },
                    "RANDOM_STRING_LENGTH": {
                      "isOptional": true,
                      "defaultValue": "5"
                    },
                    "MAX_CONCURRENT_REQUESTS": {
                      "isOptional": true,
                      "defaultValue": "3"
                    },
                    "MAX_REQUESTS_PER_MINUTE": {
                      "isOptional": true,
                      "defaultValue": "30"
                    },
                    "MAX_REQUESTS_PER_DAY_PER_IP": {
                      "isOptional": true,
                      "defaultValue": "600"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:7860": {
                        "port": 7860
                      }
                    }
                  },
                  "volumeMounts": {
                    "a852e347-feb9-4586-8726-e39cf226157c": {
                      "mountPath": "/hajimi/settings"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-09T02:29:36.255Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_16050e54a7ac42718fae",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 29,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "beijixingxing/hajimi:latest"
  }
}
