---
title: "Get a commit"
method: GET
path: "/api/v1/commits/{owner}/{repo}/{commit}"
tags: ["commits"]
---

# Get a commit

`GET /api/v1/commits/{owner}/{repo}/{commit}`

## Request

- Base URL: `https://api.smith.langchain.com`
- URL: `https://api.smith.langchain.com/api/v1/commits/{owner}/{repo}/{commit}`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in header `X-Tenant-Id`
  - HTTP bearer

Retrieves a specific commit by hash, tag, or "latest" for a repository.
This endpoint supports both authenticated and unauthenticated access.
Authenticated users can access private repos, while unauthenticated users can only access public repos.
Commit resolution logic:
- "latest" or empty: Get the most recent commit
- Less than 8 characters: Only check for tags
- 8 or more characters: Prioritize commit hash over tag, check both

## Path parameters

- `owner` string, required
- `repo` string, required
- `commit` string, required

## Query parameters

- `get_examples` boolean
- `include` string
- `include_model` boolean
- `is_view` boolean

## Response `200`

OK

- CommitsCommitResponse
  - `commit_hash` string
  - `description` string
  - `examples` CommitsExampleRun[]
    - `id` string, uuid
    - `inputs` object
    - `outputs` object
    - `session_id` string, uuid
    - `start_time` string
  - `is_draft` boolean
  - `manifest` object
  - `model_config` object
  - `model_provider` string

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `500`: Internal Server Error

## Changes

- **2026-10-16** `1a8ee9358d81`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/langchain-ai/apis/langsmith/changes/api/v1/commits/:owner/:repo/:commit/get.md)

---

[API](https://skmtc.dev/langchain-ai/apis/langsmith.md) - [All operations](https://skmtc.dev/langchain-ai/apis/langsmith/llms.txt) - [OpenAPI document](https://skmtc.dev/langchain-ai/apis/langsmith/revisions/7a01c01f75e8?raw)
