---
title: "Get Repository Raw File"
method: GET
path: "/api/v2/repos/{username}/{repo_name}/raw/{file_path}"
---

# Get Repository Raw File

`GET /api/v2/repos/{username}/{repo_name}/raw/{file_path}`

Get raw file contents from repo repository

## Path parameters

- `username` string, required
- `repo_name` string, required
- `file_path` string, required

## Query parameters

- `ref` string — Git reference (branch, tag, or commit SHA)

## Headers

- `authorization` string, nullable

## Cookies

- `modaic_session` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/modaic-ai/apis/modaic-api.md) · [All operations](https://skmtc.dev/modaic-ai/apis/modaic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modaic-ai/apis/modaic-api/revisions/43a90513ac59?raw)
