API Reference / Code - Commit Narrative

Get a commit's narrative

get https://api.intelig.ai/api/v1/intelig/code/commits/{sha}/narrative

Auth: Authorization: ApiKey <key> (an API key sent as Bearer is rejected) or Authorization: Bearer <jwt> for a dashboard session. operationId: getBySha

Returns the most recently generated narrative for the commit with this SHA. Responds 204 with no body when no narrative has been generated yet — call the generate endpoint first.

Example request

curl -X GET "https://api.intelig.ai/api/v1/intelig/code/commits/string/narrative" \
  -H "Authorization: ApiKey $INTELIG_API_KEY"

Path parameters

NameTypeRequiredDescription
sha string yes —

Response 200

application/json · CommitNarrativeResponse

FieldTypeDescription
id string (uuid) —
commitId integer (int64) —
commitSha string —
status string —
body object —
promptVersion string —
modelUsed string —
generationMode string —
inputTokens integer (int32) —
outputTokens integer (int32) —
latencyMs integer (int64) —
failureReason string —
failureDetail string —
generatedAt string (date-time) —

Status codes

  • 200 — OK
  • 401 — —
  • 429 — —

Every response is wrapped in { success, message, data }. A 4xx means the request is wrong — do not retry it unchanged. A 429 carries Retry-After in seconds.