{
  "manifest_version": "1.0.0",
  "template": {
    "id": "8da9622a-81d6-41fe-b8e2-031935d7676f",
    "slug": "clawrouter",
    "name": "ClawRouter",
    "description": "Self-hosted OpenAI-compatible LLM router with pay-per-call crypto billing",
    "url": "https://railway.com/deploy/clawrouter",
    "upstream": {
      "repo_url": "https://github.com/INAPP-Mobile/clawrouter"
    }
  },
  "services": [
    {
      "name": "clawrouter",
      "source": {
        "repo": "https://github.com/INAPP-Mobile/clawrouter"
      },
      "needs_volume": true,
      "volume_mount_path": "/root/.openclaw",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "CLAWROUTER_WORKER",
      "service": "clawrouter",
      "description": "Set to 1 to enable Worker Mode, which earns USDC by running BlockRun network health checks in the background.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "BLOCKRUN_WEB_SEARCH",
      "service": "clawrouter",
      "description": "Registration mode for BlockRun's built-in web search tool. auto enables it when supported; off disables it.",
      "secret": false,
      "strategy": "default",
      "default": "auto"
    },
    {
      "key": "CLAWROUTER_DISABLED",
      "service": "clawrouter",
      "description": "Set to true to bypass smart routing and pass every request straight through to the upstream model.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CLAWROUTER_DEBUG_HEADERS",
      "service": "clawrouter",
      "description": "Controls x-clawrouter-* debug response headers exposing routing decisions. Set to off to suppress them.",
      "secret": false,
      "strategy": "default",
      "default": "on"
    },
    {
      "key": "CLAWROUTER_PAYMENT_CHAIN",
      "service": "clawrouter",
      "description": "Chain used to settle pay-per-call model spend. Options: solana (default, cheapest fees) or base.",
      "secret": false,
      "strategy": "default",
      "default": "solana"
    },
    {
      "key": "CLAWROUTER_SOLANA_RPC_URL",
      "service": "clawrouter",
      "description": "Solana RPC endpoint used for USDC balance checks. Swap in a private RPC if you hit public rate limits.",
      "secret": false,
      "strategy": "default",
      "default": "https://api.mainnet-beta.solana.com"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "clawrouter"
      }
    },
    "cli": "railway deploy --template clawrouter",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "8da9622a-81d6-41fe-b8e2-031935d7676f",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "6cf7beda-cd0f-4a45-9767-ecce53856fd9": {
                  "icon": null,
                  "name": "clawrouter",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/INAPP-Mobile/clawrouter",
                    "rootDirectory": null
                  },
                  "variables": {
                    "CLAWROUTER_WORKER": {
                      "isOptional": false,
                      "description": "Set to 1 to enable Worker Mode, which earns USDC by running BlockRun network health checks in the background.",
                      "defaultValue": "0"
                    },
                    "BLOCKRUN_WALLET_KEY": {
                      "isOptional": true,
                      "description": "Optional existing wallet private key (hex, 0x-prefixed) to restore a funded BlockRun wallet. Leave blank to auto-generate a new EVM + Solana wallet on first boot and back it up from the deploy logs.",
                      "defaultValue": ""
                    },
                    "BLOCKRUN_WEB_SEARCH": {
                      "isOptional": false,
                      "description": "Registration mode for BlockRun's built-in web search tool. auto enables it when supported; off disables it.",
                      "defaultValue": "auto"
                    },
                    "CLAWROUTER_DISABLED": {
                      "isOptional": false,
                      "description": "Set to true to bypass smart routing and pass every request straight through to the upstream model.",
                      "defaultValue": "false"
                    },
                    "CLAWROUTER_DEBUG_HEADERS": {
                      "isOptional": false,
                      "description": "Controls x-clawrouter-* debug response headers exposing routing decisions. Set to off to suppress them.",
                      "defaultValue": "on"
                    },
                    "CLAWROUTER_PAYMENT_CHAIN": {
                      "isOptional": false,
                      "description": "Chain used to settle pay-per-call model spend. Options: solana (default, cheapest fees) or base.",
                      "defaultValue": "solana"
                    },
                    "CLAWROUTER_SOLANA_RPC_URL": {
                      "isOptional": false,
                      "description": "Solana RPC endpoint used for USDC balance checks. Swap in a private RPC if you hit public rate limits.",
                      "defaultValue": "https://api.mainnet-beta.solana.com"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "6cf7beda-cd0f-4a45-9767-ecce53856fd9": {
                      "mountPath": "/root/.openclaw"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-15T22:14:40.394Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-14T20:32:59.356Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_504c1e2967754f3abff9",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 130,
    "typical_build_seconds": 71,
    "typical_start_seconds": 10,
    "slowest_service": "clawrouter"
  }
}
