# fastapi.online — Git Diff to Commit Message Generator

> fastapi.online — Git Diff to Commit Message Generator is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.0015/call, status unknown (last checked 2026-09-15).

Generates a commit message from a git diff, in either conventional or plain style

## Facts

- Endpoint: POST https://api.fastapi.online/commit-message
- Price: $0.0015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-git-diff-to-commit-message-generator-97ff2158
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_P61CXhDUsV2SjgdtSyEk5

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 fastapi-online-git-diff-to-commit-message-generator-97ff2158 -d '<json body>'
```

Example prompt: Can you generate a conventional-style commit message from this git diff? <paste diff here>

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call commit message generation with no signup required, especially in automated pipelines or agent workflows where you want to avoid managing API keys. It supports conventional and plain styles, making it suitable for both structured semantic versioning workflows and informal projects. Prefer alternatives if you need full chat-based iteration on the message or if you require free-tier usage.

## Known failure modes

- Empty or missing diff field returns a validation error
- Diff exceeding 20,000 characters is rejected
- Invalid style enum value returns a 422 Unprocessable Entity
- Model may produce a vague or inaccurate message if the diff is too large or noisy
- Payment not included or insufficient funds returns a 402 Payment Required

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

A generated commit message string summarizing the changes in the provided git diff, formatted according to the requested style (conventional: e.g. 'feat(auth): add OAuth2 login support'; plain: a short human-readable sentence).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "diff": {
   "type": "string",
   "maxLength": 20000,
   "minLength": 1
  },
  "style": {
   "enum": [
    "conventional",
    "plain"
   ],
   "type": "string"
  }
 }
}
```

## More

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