{
  "manifest_version": "1.0.0",
  "template": {
    "id": "138f97b7-e0bc-4831-a180-d1c3adf86281",
    "slug": "portkey",
    "name": "Portkey",
    "description": "A powerful AI gateway for routing, guardrails, fallbacks, and 200+ LLMs.",
    "url": "https://railway.com/deploy/portkey",
    "upstream": {
      "image": "portkeyai/gateway:latest"
    }
  },
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Portkeyai",
      "source": {
        "image": "portkeyai/gateway:latest"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Redis hostname available through Railway private networking",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Default Redis TCP port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Default Redis ACL username",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Full Redis connection URL using Railway private networking",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Compatibility alias for clients expecting REDISPASSWORD",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Randomly generated Redis authentication password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "Portkeyai",
      "description": "HTTP port used by Portkey AI Gateway",
      "secret": false,
      "strategy": "default",
      "default": "8787"
    },
    {
      "key": "NODE_ENV",
      "service": "Portkeyai",
      "description": "Run the gateway in production mode",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "LOG_LEVEL",
      "service": "Portkeyai",
      "description": "Gateway logging level",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "REDIS_URL",
      "service": "Portkeyai",
      "description": "Redis connection URL referenced from the Redis service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CACHE_STORE",
      "service": "Portkeyai",
      "description": "Use Redis as the shared cache store",
      "secret": false,
      "strategy": "default",
      "default": "redis"
    },
    {
      "key": "PORTKEY_CLIENT_AUTH",
      "service": "Portkeyai",
      "description": "Optional secret used to protect gateway client access",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "portkey"
      }
    },
    "cli": "railway deploy --template portkey",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "138f97b7-e0bc-4831-a180-d1c3adf86281",
            "serializedConfig": {
              "services": {
                "086edf44-19bd-4c6c-b008-103f049211e6": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\""
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Redis hostname available through Railway private networking",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Default Redis TCP port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Default Redis ACL username",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Full Redis connection URL using Railway private networking",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Compatibility alias for clients expecting REDISPASSWORD",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Randomly generated Redis authentication password",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "086edf44-19bd-4c6c-b008-103f049211e6": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha"
                },
                "800a2946-f1cb-4398-9729-44ad46ae21a0": {
                  "name": "Portkeyai",
                  "deploy": {
                    "healthcheckPath": ""
                  },
                  "source": {
                    "image": "portkeyai/gateway:latest"
                  },
                  "variables": {
                    "PORT": {
                      "description": "HTTP port used by Portkey AI Gateway",
                      "defaultValue": "8787"
                    },
                    "NODE_ENV": {
                      "description": "Run the gateway in production mode",
                      "defaultValue": "production"
                    },
                    "LOG_LEVEL": {
                      "description": "Gateway logging level",
                      "defaultValue": "info"
                    },
                    "REDIS_URL": {
                      "description": "Redis connection URL referenced from the Redis service",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "CACHE_STORE": {
                      "description": "Use Redis as the shared cache store",
                      "defaultValue": "redis"
                    },
                    "PORTKEY_CLIENT_AUTH": {
                      "description": "Optional secret used to protect gateway client access",
                      "defaultValue": "{{PORTKEY_CLIENT_AUTH}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8787": {
                        "port": 8787
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-24T04:14:44.625Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-21T19:14:48.037Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_79651ac2ed75419f9689",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 58,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Portkeyai"
  }
}
