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

# Get a commit

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

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

---

[API](https://skmtc.net/langchain-ai/apis/langsmith.md) · [All operations](https://skmtc.net/langchain-ai/apis/langsmith/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/langchain-ai/langsmith/revisions/a0acb3a6a101/schema)
