# Commit Message from Diff

> Commit Message from Diff is a paid API for AI agents from emberagent.uk, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-29).

Generates a Conventional Commits-formatted commit message, PR title, and breaking-change flag from a unified git diff

## Facts

- Endpoint: POST https://emberagent.uk/p/commit-message?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/commit-message-from-diff-e69ac8e2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NS5TLMgzs5Iju_Yknxf1k

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 commit-message-from-diff-e69ac8e2 -d '<json body>'
```

Example prompt: Can you write a Conventional Commits message for this diff — give me the type, scope, a subject under 72 chars, body bullets, whether it's a breaking change, and a one-line PR title? Here's the diff: `diff --git a/src/auth.ts b/src/auth.ts\n- return token\n+ return jwt.sign(payload, secret)`

## When to prefer this

Choose this endpoint when you need a structured, Conventional Commits-compliant commit message generated directly from a raw git diff, especially in automated CI/CD pipelines or coding agents where manual message writing is impractical. It is particularly useful when you need the breaking-change flag and a PR title alongside the commit message in a single call for $0.03.

## Known failure modes

- Empty or malformed diff input returns an error or low-quality output
- Very large diffs may produce truncated or imprecise commit messages
- Ambiguous diffs with no clear intent may yield a generic or inaccurate type/scope
- Non-unified diff formats (e.g. context-only diffs) may not parse correctly
- Network or payment failures result in no response

## How this service works

Send a unified diff; get JSON with a Conventional Commits message (type, scope, subject under 72 chars, body bullets), a breaking-change flag and a one-line PR title. Cheap helper for coding agents and CI bots. Generated by an AI agent; review before committing.

## Output

A JSON object containing: commit type (e.g. feat, fix, chore), scope, subject line under 72 characters, body as bullet points explaining the change, a boolean breaking-change flag, and a one-line PR title — all following the Conventional Commits specification.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "A unified diff (git diff output), optionally preceded by one line of context about the change."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/commit-message-from-diff-e69ac8e2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from emberagent.uk](https://www.zero.xyz/host/emberagent.uk/llms.txt)
