{
  "manifest_version": "1.0.0",
  "template": {
    "id": "51be5165-94a2-420c-a78e-6fdc848c8402",
    "slug": "litellm-or-just-updated-ai-gateway-add-m",
    "name": "LiteLLM | (Just Updated) AI Gateway, Add Models in the UI, Zero Required Keys",
    "description": "LiteLLM AI gateway. Keys auto-set, add models in UI, saved in Postgres",
    "url": "https://railway.com/deploy/litellm-or-just-updated-ai-gateway-add-m",
    "upstream": {
      "image": "ghcr.io/berriai/litellm-database:v1.104.0@sha256:fbe28229d2d02181c0a7d9df9599de614b491f3d897d2d7da18404f088310218"
    }
  },
  "services": [
    {
      "name": "postgres",
      "source": {
        "image": "postgres:17.10-trixie"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    },
    {
      "name": "litellm",
      "source": {
        "image": "ghcr.io/berriai/litellm-database:v1.104.0@sha256:fbe28229d2d02181c0a7d9df9599de614b491f3d897d2d7da18404f088310218"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "UI_PASSWORD",
      "service": "litellm",
      "description": "Provide a value for UI_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "litellm",
      "description": "Provide a value for POSTGRES_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "LITELLM_SALT_KEY",
      "service": "litellm",
      "description": "Provide a value for LITELLM_SALT_KEY.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "litellm",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LITELLM_MASTER_KEY",
      "service": "litellm",
      "description": "Provide a value for LITELLM_MASTER_KEY.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "litellm-or-just-updated-ai-gateway-add-m"
      }
    },
    "cli": "railway deploy --template litellm-or-just-updated-ai-gateway-add-m",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "51be5165-94a2-420c-a78e-6fdc848c8402",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "55e2eadc-a1e9-456e-be8a-691b7b745c5f": {
                  "icon": null,
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:17.10-trixie"
                  },
                  "variables": {
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "55e2eadc-a1e9-456e-be8a-691b7b745c5f": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                },
                "e418ee66-b38c-404c-bafc-7ceb3add5d3d": {
                  "icon": null,
                  "name": "litellm",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'export UI_USERNAME=\"${UI_USERNAME:-admin}\" STORE_MODEL_IN_DB=True DATABASE_URL=\"postgresql://postgres:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/postgres\"; n=0; until python -c \"import socket,os;socket.create_connection((os.environ[\\\"POSTGRES_HOST\\\"],5432),3).close()\" 2>/dev/null; do n=$((n+1)); [ $n -gt 60 ] && { echo \"[railway] postgres unreachable at $POSTGRES_HOST\"; exit 1; }; sleep 2; done; echo \"[railway] port=$PORT postgres=$POSTGRES_HOST ui_user=$UI_USERNAME store_model_in_db=$STORE_MODEL_IN_DB\"; exec litellm --port \"$PORT\"'",
                    "healthcheckPath": "/health/readiness",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/berriai/litellm-database:v1.104.0@sha256:fbe28229d2d02181c0a7d9df9599de614b491f3d897d2d7da18404f088310218"
                  },
                  "variables": {
                    "UI_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{UI_PASSWORD}}"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": false,
                      "defaultValue": "${{postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "LITELLM_SALT_KEY": {
                      "isOptional": false,
                      "defaultValue": "{{LITELLM_SALT_KEY}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "LITELLM_MASTER_KEY": {
                      "isOptional": false,
                      "defaultValue": "{{LITELLM_MASTER_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "litellm",
      "method": "GET",
      "path": "/health/readiness",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-30T04:14:55.026Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-20T13:13:46.916Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_c0c742c9c7bf438eb46b",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 86,
    "typical_build_seconds": 0,
    "typical_start_seconds": 42,
    "slowest_service": "litellm"
  }
}
