API Documentation
Use the LogCraft REST API to generate release notes from your CI/CD pipeline, shell scripts, or any tool that can make HTTP requests.
🔑 Free during beta — request an API key below and start building immediately. No rate limits for now.
Quickstart
Three steps to get release notes in your pipeline:
1. Get an API key
curl -X POST https://logcraft-kael.fly.dev/api/v1/keys \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "name": "MyApp CI"}'
2. Generate release notes
curl -X POST https://logcraft-kael.fly.dev/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"commits": "feat: add dark mode\nfix: memory leak in cache\nperf: reduce bundle size",
"version": "1.2.0",
"project_name": "MyApp"
}'
3. Parse the response
curl ... | jq '.data.technical.markdown' # → CHANGELOG.md curl ... | jq '.data.user_friendly.highlights' # → What's New bullets curl ... | jq '.data.marketing.tweet' # → Tweet copy curl ... | jq '.share_url' # → Shareable URL
Authentication
All API requests require an API key passed in the Authorization header:
Header format
Authorization: Bearer lc_your_api_key_here
You can also use the X-API-Key header as an alternative:
Alternative header
X-API-Key: lc_your_api_key_here
Generate Endpoint
POST
/api/v1/generate
Transform git commits or release notes into polished content for three audiences.
Request Body (JSON)
| Parameter | Type | Required | Description |
|---|---|---|---|
| commits | string | required | Raw commit messages, PR descriptions, or notes. Newline-separated. Max 8000 chars. |
| version | string | optional | Version string (e.g. "1.2.0") to include in the output. |
| project_name | string | optional | Product name to include in generated copy. |
Example request
{
"commits": "feat: add OAuth login with Google\nfix: fix session timeout bug\nperf: cache API responses",
"version": "2.0.0",
"project_name": "Acme App"
}
Response Format
Success response
{
"success": true,
"share_url": "https://logcraft-kael.fly.dev/share/abc12345",
"share_id": "abc12345",
"data": {
"technical": {
"title": "v2.0.0 - Authentication & Performance",
"entries": [
{"type": "feat", "text": "Add OAuth login with Google"},
{"type": "fix", "text": "Resolve session timeout edge case"},
{"type": "perf", "text": "Implement API response caching for 10x speed improvement"}
],
"markdown": "## [2.0.0] - 2024-01-15\n\n### Features\n..."
},
"user_friendly": {
"title": "What's New in v2.0.0",
"summary": "Sign in with Google, and the app is much faster.",
"highlights": ["🔐 Sign in with your Google account", "⚡ Everything loads faster"],
"full_text": "Big update today! You can now sign in with..."
},
"marketing": {
"headline": "Google Login + Major Speed Boost 🚀",
"hook": "Two things you asked for: Google login and a faster app. Both ship today.",
"key_features": ["One-click Google login", "10x faster API responses"],
"cta": "Update now →",
"tweet": "🎉 v2.0.0: Google login is live + app is 10x faster. Try it!"
}
}
}
Shell Script Integration
Drop this into your release process to auto-generate notes from recent commits:
release-notes.sh
#!/bin/bash
# Generate release notes from recent commits
# Usage: ./release-notes.sh 1.2.0
VERSION=${1:-""}
API_KEY="YOUR_LOGCRAFT_API_KEY"
# Get commits since last tag
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "HEAD~10")
COMMITS=$(git log ${LAST_TAG}..HEAD --pretty=format:"%s" --no-merges)
if [ -z "$COMMITS" ]; then
echo "No commits found since $LAST_TAG"
exit 1
fi
echo "Generating release notes for $VERSION..."
RESPONSE=$(curl -s -X POST https://logcraft-kael.fly.dev/api/v1/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"commits\": $(echo "$COMMITS" | jq -Rs .),
\"version\": \"$VERSION\",
\"project_name\": \"$(basename $(git rev-parse --show-toplevel))\"
}")
# Extract and save CHANGELOG section
echo "$RESPONSE" | jq -r '.data.technical.markdown' > RELEASE_NOTES.md
echo "$RESPONSE" | jq -r '.share_url'
echo "✓ Release notes saved to RELEASE_NOTES.md"
GitHub Actions Integration
Add LogCraft to your release workflow:
.github/workflows/release.yml
name: Generate Release Notes
on:
push:
tags:
- 'v*'
jobs:
release-notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get commits since last tag
id: commits
run: |
LAST_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -z "$LAST_TAG" ]; then
COMMITS=$(git log --pretty=format:"%s" --no-merges -20)
else
COMMITS=$(git log ${LAST_TAG}..HEAD --pretty=format:"%s" --no-merges)
fi
echo "commits<> $GITHUB_OUTPUT
echo "$COMMITS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Generate release notes
id: generate
run: |
RESPONSE=$(curl -s -X POST https://logcraft-kael.fly.dev/api/v1/generate \
-H "Authorization: Bearer ${{ secrets.LOGCRAFT_API_KEY }}" \
-H "Content-Type: application/json" \
-d "{
\"commits\": $(echo '${{ steps.commits.outputs.commits }}' | jq -Rs .),
\"version\": \"${{ github.ref_name }}\",
\"project_name\": \"${{ github.repository }}\"
}")
CHANGELOG=$(echo "$RESPONSE" | jq -r '.data.technical.markdown')
SHARE_URL=$(echo "$RESPONSE" | jq -r '.share_url')
echo "changelog<> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "share_url=$SHARE_URL" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
body: ${{ steps.generate.outputs.changelog }}
draft: false
Get Your Free API Key
Free during beta. No rate limits. Starts working immediately.