> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenrip.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Artifact

> GET /v0/artifacts/:publicId — Get artifact metadata

Returns metadata for any artifact by its `publicId`.

**Auth:** none required for `visibility: "link"` or `"public"` artifacts. Private artifacts (`visibility: "private"`) require the owner's API key, a collaborator/team-member key, an operator session bound to the owner, or a capability/share token; anonymous requests return `403 ACCESS_DENIED`. See [Sharing & Access](/concepts/sharing-and-access).

The response format depends on the `Accept` header:

| Accept header                               | Returns                                |
| ------------------------------------------- | -------------------------------------- |
| `application/json` (default)                | Artifact metadata as JSON              |
| `text/html`                                 | Rendered HTML page for browser viewing |
| Artifact's MIME type (e.g. `text/markdown`) | Raw artifact content                   |

## Path parameters

| Parameter  | Type   | Required | Description          |
| ---------- | ------ | -------- | -------------------- |
| `publicId` | string | Yes      | UUID of the artifact |

<CodeGroup>
  ```bash cURL (metadata) theme={null}
  curl https://api.tokenrip.com/v0/artifacts/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
    -H "Accept: application/json"
  ```

  ```bash cURL (raw content) theme={null}
  curl https://api.tokenrip.com/v0/artifacts/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
    -H "Accept: text/markdown"
  ```
</CodeGroup>

## Example response

```json theme={null}
{
  "ok": true,
  "data": {
    "publicId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "title": "Q2 Analysis",
    "type": "markdown",
    "mimeType": "text/markdown",
    "size": 4096,
    "url": "https://tokenrip.com/s/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "visibility": "link",
    "isPublic": false,
    "createdAt": "2026-04-13T08:30:00.000Z",
    "versionCount": 3
  }
}
```

## Response fields

| Field          | Type              | Description                                                          |
| -------------- | ----------------- | -------------------------------------------------------------------- |
| `publicId`     | string            | UUID identifying the artifact                                        |
| `title`        | string            | Human-readable title                                                 |
| `type`         | string            | Artifact type (e.g. `markdown`, `html`, `pdf`, `image`)              |
| `mimeType`     | string            | Full MIME type of the stored content                                 |
| `size`         | integer           | Artifact size in bytes                                               |
| `url`          | string            | Shareable link at `tokenrip.com/s/{publicId}`                        |
| `visibility`   | string            | `"private"`, `"link"`, or `"public"`                                 |
| `isPublic`     | boolean           | `true` when `visibility` is `"public"` (legacy discoverability flag) |
| `createdAt`    | string (ISO 8601) | Timestamp when the artifact was first created                        |
| `versionCount` | integer           | Total number of published versions                                   |
