---
title: "Get Skill File Route"
method: GET
path: "/skills/{id_or_slug}/files"
---

# Get Skill File Route

`GET /skills/{id_or_slug}/files`

## Request

- Base URL: `https://api.goodeye.dev/v1`
- URL: `https://api.goodeye.dev/v1/skills/{id_or_slug}/files`
- Auth: none declared

Fetch one or more files from a skill version's file tree.

Provide ``path`` for a single file or ``paths`` (repeatable) for a batch.
At least one of the two parameters is required; supplying neither returns
a validation error. Returns content inline for text files and small binary
files; binary files over the size limit return metadata with an error field
instead of inline bytes. Batch responses carry an additional
``batch_response_cap_exceeded`` error when the aggregate inline budget is
exhausted.

Pass ``format=raw`` with a single ``path`` to receive the file's raw bytes
instead of the JSON envelope. Raw serving applies no inline size ceiling, so
it is the path the CLI's ``sync pull`` uses to mirror a binary too large to
inline (a demo image or asset) down to disk. Pair ``format=raw`` with
``sha256`` to content-address the fetch. Every raw response carries the same
hardening headers as the template raw route, so a file can never execute as
an active document in a browser. ``format`` is ignored for a batch
(``paths``) request; raw is single-file only.

## Path parameters

- `id_or_slug` string, required

## Query parameters

- `path` string, nullable: Relative path of the file within the skill's file tree
- `paths` string[], nullable: One or more relative paths for a batch fetch. Repeat the parameter for each path: ?paths=a.txt&paths=b.txt. Mutually exclusive with path.
- `version` integer, nullable
- `format` string, nullable: Set to 'raw' to return a single file's raw bytes instead of the JSON envelope. Unlike the inline JSON response, raw serving has no binary size ceiling, so it is the only way to retrieve a binary larger than the inline limit. Requires 'path' (not 'paths'); omit for the default structured JSON response.
- `sha256` string, nullable: Content address of the expected file. When provided with format=raw, the file is resolved by path and then confirmed to match this value; a stale or mismatched address returns not found.

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/goodeye/apis/goodeye-api.md) · [All operations](https://skmtc.dev/goodeye/apis/goodeye-api/llms.txt) · [OpenAPI document](https://skmtc.dev/goodeye/apis/goodeye-api/revisions/547cb8bb6ede?raw)
