{"uid":"cap_B-CeAc-elkCpsENF3fEbc","slug":"api-strale-io-8f824591","name":"Commit Message Generator from Git Diff","description":"Generate conventional commit messages from git diffs or change descriptions. Returns subject, body, type, scope.","url":"https://api.strale.io/x402/commit-message-generate","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["diff"],"properties":{"diff":{"type":"string"},"style":{"type":"string","description":"conventional/angular/simple"}}}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"diff":"- function calculateTotal(items) {\n-   return items.reduce((sum, item) => sum + item.price, 0);\n- }\n+ function calculateTotal(items) {\n+   const taxRate = 0.1;\n+   return items.reduce((sum, item) => sum + (item.price * (1 + taxRate)), 0);\n+ }","style":"conventional"},"response":{"body":"Calculate item totals with 10% tax rate applied to each item price before summing. This ensures accurate total calculations that include applicable taxes.","type":"feat","_meta":{"payment":{"method":"x402","price_usd":0.054000000000000006,"settlement_id":"0x662cb70eaac1a26d8808eb0b846581c27b010b4c691ebfeab9b175144d1dc30e"},"capability":"commit-message-generate","latency_ms":1254,"provenance":{"source":"claude-haiku","fetched_at":"2026-06-16T01:20:38.536Z"}},"scope":"pricing","subject":"feat: add tax calculation to total price","conventional":"feat(pricing): feat: add tax calculation to total price","full_message":"feat(pricing): feat: add tax calculation to total price\n\nCalculate item totals with 10% tax rate applied to each item price before summing. This ensures accurate total calculations that include applicable taxes.","files_summary":"Modified calculateTotal() function to include tax rate calculation","breaking_change":false}},"exampleRequest":{"diff":"- function calculateTotal(items) {\n-   return items.reduce((sum, item) => sum + item.price, 0);\n- }\n+ function calculateTotal(items) {\n+   const taxRate = 0.1;\n+   return items.reduce((sum, item) => sum + (item.price * (1 + taxRate)), 0);\n+ }","style":"conventional"},"tags":["x402"],"displayCostAmount":"0.054001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.054001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.054","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.054","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_c_6wAkWrcE0HldFElv4Yf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.054","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates structured conventional commit messages (subject, body, type, scope) from a git diff or change description","exampleAgentPrompt":"Generate a conventional commit message from this git diff: `- const x = 1\\n+ const x = config.timeout` — use the 'conventional' style and give me the type, scope, subject, and body.","exampleUseCases":null,"resultDescription":"Returns a structured commit message with: subject line (type + scope + short description), body (longer explanation of changes), commit type (e.g. feat, fix, chore, refactor), and scope (affected module or area)","failureModes":["Missing required 'diff' query parameter returns an error","Empty or malformed diff may produce a generic or low-quality commit message","Very large diffs may be truncated or result in overly broad messages","Invalid 'style' enum value may fall back to default conventional format"],"whenToPreferThis":"Use this endpoint when you need to auto-generate commit messages that conform to the Conventional Commits specification from raw git diffs or plain-English change descriptions. Ideal for CI/CD pipelines, developer tools, or AI coding assistants that need structured commit metadata (type + scope + subject + body) rather than a freeform message.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":2,"lastUsedAt":"2026-05-27T21:42:25.114Z","lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:42:19.284Z","isFirstParty":false}