Skip to content
FeedbackDashboard

Generate an AI commit message for a specific SDK

POST/v0/projects/{project}/generate_commit_message

Generates an AI commit message by comparing two git refs in the SDK repository.

Path ParametersExpand Collapse
project: optional string
Query ParametersExpand Collapse
target: "python" or "node" or "typescript" or 10 more

Language target

Accepts one of the following:
"python"
"node"
"typescript"
"java"
"kotlin"
"go"
"ruby"
"terraform"
"cli"
"csharp"
"php"
"openapi"
"sql"
Body ParametersExpand Collapse
base_ref: string

Base ref for comparison

head_ref: string

Head ref for comparison

ReturnsExpand Collapse
ai_commit_message: string

Generate an AI commit message for a specific SDK

curl https://api.stainless.com/v0/projects/$PROJECT/generate_commit_message \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $STAINLESS_API_KEY" \
    -d '{
          "base_ref": "base_ref",
          "head_ref": "head_ref"
        }'
{
  "ai_commit_message": "ai_commit_message"
}
Returns Examples
{
  "ai_commit_message": "ai_commit_message"
}