---
title: "Read a publicly shared original Library file"
method: GET
path: "/library/public/{token}"
---

# Read a publicly shared original Library file

`GET /library/public/{token}`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/library/public/{token}`
- Auth: none required

No cookie or API key is required. Returns a view-only document snapshot; raw=1 or download=1 streams the original bytes with Range support. Source-owner permissions and link revocation are rechecked for every request. Transport URLs stay server-side. A path query is rejected: the token reads only the granted original file, not its siblings.

## Path parameters

- `token` string, required

## Query parameters

- `raw` '1'
- `download` '1'

## Headers

- `Range` string

## Response `200`

Snapshot or original file bytes

- SharedLibrarySource
  - `name` string, required
  - `format` 'file' | 'site', required
  - `mediaType` string, required
  - `revision` string, required
  - `editable` boolean, required
  - `url` string, required: Same API path with raw=1; the original bytes, never a storage credential.
  - `maxBytes` integer, required
  - `text` string, nullable
  - `html` string
  - `office` string: Native Office source bytes as base64 when supported.
  - `history` object[], required
  - `previewUrl` string: Isolated browser preview when the reader has the required browser session, or the link is public.
  - `previewUnavailable` string, nullable
  - `sizeBytes` integer
  - `sharedBy` string, nullable
  - `libraryRef` union
    - object
      - `kind` 'agent_prompt', required
      - `agentId` string, required: The original agent user instruction file (AGENTS.md); never the combined runtime/system prompt.
    - object
      - `kind` 'file', required
      - `fileId` string, required
      - `sessionId` string
    - object
      - `kind` 'task_file', required
      - `taskId` string, required
      - `path` string, required
    - object
      - `kind` 'memory_note', required
      - `storeId` string, required
      - `memoryId` string, required
    - object
      - `kind` 'skill_file', required
      - `skillId` string, required
      - `path` string, required
    - object
      - `kind` 'artifact', required
      - `artifactId` string, required
    - object
      - `kind` 'platform_artifact', required
      - `artifactId` string, required
      - `path` string: Exact full path from the native artifact manifest; DesignSystem files use root plus the relative editable_files path. Omit only for the entire artifact entry.

## Other responses

- `206`: Requested original-file byte range
- `default`: Error — { error: { code, message } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/library/public/:token/get.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/0d435187cd55?raw)
