---
title: "Get raw file content"
method: GET
path: "/repositories/{id}/blob/{blob_name}/{path}"
tags: ["repositories"]
---

# Get raw file content

`GET /repositories/{id}/blob/{blob_name}/{path}`

Returns raw file content from a Git repository at a given blob reference (commit SHA, tag, or branch). Use mode=raster&page=N to get a rasterized JPEG of a document page. Use mode=text&page=N to get extracted text from a document page. Use mode=text without page to get the page count.

## Path parameters

- `id` integer, required
- `blob_name` string, required
- `path` string, required

## Query parameters

- `lines` string
- `line_numbers` boolean
- `mode` string
- `page` integer

## Response `200`

OK

## Other responses

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

## Changes

- **2026-07-17** `3f72fa58f3fb` — 3 info
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `404`
  - added the media type `application/json` for the response with the status `500`
- **2026-04-08** `c7c5ef75d669` — 3 breaking, 3 info
  - removed the media type `image/png` for the response with the status `400`
  - removed the media type `image/png` for the response with the status `404`
  - removed the media type `image/png` for the response with the status `500`
  - added the media type `image/jpeg` for the response with the status `400`
  - …2 more
- **2026-04-06** `de2135f74990` — 5 info
  - added the new optional `query` request parameter `mode`
  - added the new optional `query` request parameter `page`
  - added the media type `image/png` for the response with the status `400`
  - added the media type `image/png` for the response with the status `404`
  - …1 more
- **2026-02-26** `57ff721191f4` — 1 info
  - endpoint added
- **2026-02-19** `41466db231c5` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/helixml/apis/kodit-api/changes/repositories/:id/blob/:blob_name/:path/get.md)

---

[API](https://skmtc.dev/helixml/apis/kodit-api.md) · [All operations](https://skmtc.dev/helixml/apis/kodit-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/helixml/kodit-api/revisions/3f72fa58f3fb/schema)
