# PR Description Generator from Diff

> PR Description Generator from Diff is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054001/call, status unknown (last checked 2026-10-12).

Generates a structured pull request description (title, summary, changes list, testing steps) from a code diff or commit log.

## Facts

- Endpoint: GET https://api.strale.io/x402/pr-description-generate?utm_source=zero.xyz
- Price: $0.054001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-4f723c96
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_i3GEt8T2oaMV03fKs0O73

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 api-strale-io-4f723c96
```

Example prompt: Generate a pull request description from this diff: `diff --git a/src/auth.js b/src/auth.js\n- const token = jwt.sign(payload, secret);\n+ const token = jwt.sign(payload, secret, { expiresIn: '1h' });` — I need a title, summary, list of changes, and testing steps.

## When to prefer this

Use this endpoint when you need to automatically generate a well-structured pull request description from raw git diff output or a commit log, especially in CI/CD pipelines, developer bots, or code review automation workflows. It's ideal when developers want to skip writing PR descriptions manually and need structured output (title + summary + changes + testing steps) ready to post to a VCS platform.

## Known failure modes

- Missing required 'diff' query parameter returns validation error
- Empty or malformed diff string may produce vague or incomplete output
- Very large diffs may time out or return truncated results
- Non-code text passed as diff may yield low-quality or irrelevant descriptions

## How this service works

Generate pull request descriptions from diffs or commit logs. Returns title, summary, changes list, testing steps.

## Output

Returns a structured PR description including a concise title, a prose summary of what changed and why, a bullet-point list of individual changes, and step-by-step testing instructions suitable for posting directly into GitHub, GitLab, or Bitbucket.

## Example request

```json
{
 "diff": "diff --git a/src/utils.js b/src/utils.js\nindex 1234567..abcdefg 100644\n--- a/src/utils.js\n+++ b/src/utils.js\n@@ -10,6 +10,12 @@ function formatDate(date) {\n   return date.toISOString();\n }\n \n+function validateEmail(email) {\n+  const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n+  return emailRegex.test(email);\n+}\n+\n+module.exports.validateEmail = validateEmail;\n+\n function parseJSON(str) {\n   try {\n     return JSON.parse(str);\n",
 "title": "Add email validation utility function"
}
```

## Request schema (JSON Schema)

```json
{
 "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"
      },
      "title": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-4f723c96/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
