{"openapi":"3.1.0","info":{"title":"Levykit CI Cost Check","version":"1.0.0","summary":"Find and fix expensive patterns in GitHub Actions workflow YAML.","description":"Analyze GitHub Actions workflow YAML for CI cost waste. Returns findings with severity, location, an explanation, and a paste-ready YAML fix for each. Use this to inspect; use fix_workflow_costs to get corrected YAML back instead, and list_cost_rules to read what each rule catches. Costs $0.005 in USDC per call via x402 on Base. Reads only the YAML you send: no GitHub calls, no token, nothing stored or logged beyond anonymous usage counters. The web form and POST /v1/check/free are free within a daily quota. POST /v1/check is always paid."},"servers":[{"url":"https://gha-cost-checker.yuramelesh.workers.dev"}],"paths":{"/v1/check":{"post":{"operationId":"checkGithubActionsCost","summary":"Paid workflow check","description":"Always requires an x402 payment. One call costs $0.005.","x-payment-info":{"protocol":"x402","version":2,"scheme":"exact","price":"$0.005","priceUsd":0.005,"network":"eip155:8453","networkName":"base","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x10882F6f3B56058F3d25AD38d61e08d2dB17d6Dc","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","wellKnown":"https://gha-cost-checker.yuramelesh.workers.dev/.well-known/x402"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"}}}},"responses":{"200":{"description":"Findings report, after payment."},"402":{"description":"x402 payment required. See the PAYMENT-REQUIRED header."}}}},"/v1/fix":{"post":{"operationId":"fixWorkflowCosts","summary":"Paid workflow fix","description":"Rewrite GitHub Actions workflow YAML with the cost fixes applied. Returns the patched YAML, a list of what changed, and a list of findings left unchanged with the reason. Only mechanical fixes are applied (missing or long artifact retention, missing job timeout, missing pull request concurrency); fixes that need a guess, such as path filters, matrix size, runner choice, cache keys and cron schedules, are reported, not applied. Comments and formatting are kept, and running it on its own output changes nothing. Use check_github_actions_cost to only inspect, and list_cost_rules to see which rules are applied automatically. Costs $0.005 in USDC per call via x402 on Base. Reads only the YAML you send: no GitHub calls, no token, no commit or pull request, nothing stored or logged beyond anonymous usage counters. Always requires an x402 payment on this route.","x-payment-info":{"protocol":"x402","version":2,"scheme":"exact","price":"$0.005","priceUsd":0.005,"network":"eip155:8453","networkName":"base","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x10882F6f3B56058F3d25AD38d61e08d2dB17d6Dc","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","wellKnown":"https://gha-cost-checker.yuramelesh.workers.dev/.well-known/x402"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FixRequest"}}}},"responses":{"200":{"description":"Patched YAML with the applied and not-applied lists, after payment."},"402":{"description":"x402 payment required. See the PAYMENT-REQUIRED header."}}}},"/v1/check/free":{"post":{"operationId":"checkGithubActionsCostFree","summary":"Free workflow check until the daily agent quota is spent","description":"Same report as the paid check. After the daily quota, the response is the same 402 challenge as POST /v1/check.","x-payment-info":{"protocol":"x402","version":2,"scheme":"exact","price":"$0.005","priceUsd":0.005,"network":"eip155:8453","networkName":"base","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x10882F6f3B56058F3d25AD38d61e08d2dB17d6Dc","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","wellKnown":"https://gha-cost-checker.yuramelesh.workers.dev/.well-known/x402"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"}}}},"responses":{"200":{"description":"Findings report, counted against the free daily quota."},"402":{"description":"Free quota is exhausted. Pay the x402 challenge and retry."}}}},"/mcp":{"post":{"operationId":"mcp","summary":"MCP endpoint","description":"Streamable HTTP MCP. The tools check_github_actions_cost and fix_workflow_costs share the free daily quota with POST /v1/check/free, then require x402. list_cost_rules and list_paid_tools are free.","x-payment-info":{"protocol":"x402","version":2,"scheme":"exact","price":"$0.005","priceUsd":0.005,"network":"eip155:8453","networkName":"base","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x10882F6f3B56058F3d25AD38d61e08d2dB17d6Dc","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","wellKnown":"https://gha-cost-checker.yuramelesh.workers.dev/.well-known/x402"},"responses":{"200":{"description":"MCP JSON-RPC or server-sent events."}}}},"/web/check":{"post":{"operationId":"webCheck","summary":"Browser form check","description":"Used by the page at /. Separate daily quota. Not an agent API.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"}}}},"responses":{"200":{"description":"Findings report."},"429":{"description":"Daily web quota exhausted."}}}}},"components":{"schemas":{"CheckRequest":{"type":"object","properties":{"filename":{"type":"string"},"content":{"type":"string","description":"Workflow YAML."},"yaml":{"type":"string"},"workflows":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"content":{"type":"string"}},"required":["content"]}}}},"FixRequest":{"type":"object","properties":{"filename":{"type":"string"},"content":{"type":"string","description":"Workflow YAML."},"yaml":{"type":"string"},"workflows":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"content":{"type":"string"}},"required":["content"]}},"ruleIds":{"type":"array","items":{"type":"string"},"description":"Only act on these rule ids. Defaults to every rule."},"minSeverity":{"type":"string","enum":["info","warning","high"],"description":"Only act on findings at this severity or higher. Defaults to info."}}}}}}