---
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

## Changes

- **2026-03-31** `9b9d7777d6a9` — 3 info
  - added the new optional `query` request parameter `include`
  - added the optional property `description` to the response with the `200` status
  - added the optional property `is_draft` to the response with the `200` status

[Change history](https://skmtc.dev/langchain-ai/apis/langsmith/changes/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-service-production.skmtc.workers.dev/v1/apis/langchain-ai/langsmith/revisions/a0acb3a6a101/schema)
