# Git Diff to Conventional Commit Message Generator

> Git Diff to Conventional Commit Message Generator is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-14).

Converts a git diff into a structured Conventional Commits message with type, scope, subject, and body.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/commit-message
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/git-diff-to-conventional-commit-message-generator-c15eef66
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9lBtB9yIUgb_USloTLtcM

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability git-diff-to-conventional-commit-message-generator-c15eef66 -d '<json body>'
```

Example prompt: Generate a Conventional Commits message for this git diff — figure out the right type, scope, subject, and body: `diff --git a/src/auth/login.ts b/src/auth/login.ts\n- if (user.active) {\n+ if (user.active && !user.banned) {`

## When to prefer this

Choose this endpoint when you need to automatically generate Conventional Commits-compliant messages from raw git diffs — ideal for CI/CD pipelines, pre-commit hooks, code review automation, or developer tools that need structured, standardized commit messages without manual writing.

## Known failure modes

- Empty or malformed diff input returns an error
- Diff too large may exceed processing limits
- Ambiguous changes may produce low-confidence type/scope classification
- Non-code diffs (e.g. binary files) may not parse correctly

## How this service works

Turn a git diff into a Conventional Commits message (type, scope, subject, body).

## Output

A structured Conventional Commits message containing: a type (e.g. feat, fix, chore, refactor), an optional scope indicating the affected module, a short imperative subject line, and a longer body explaining what changed and why.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "diff": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "message": "feat: add..."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/git-diff-to-conventional-commit-message-generator-c15eef66/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
