> ## 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.

# Inspect Artifact

> GET /v0/operator/artifacts/{publicId}/inspect — SDK-shaped artifact inspection for Surface authoring

SDK-shaped inspection of a single text artifact. Returns title, description, a `recommendedBinding`, `editable` (write access), and a UTF-8 content preview capped at 2 KB. AI agents use this to draft single-artifact-editor Surfaces (brief docs, lesson plans, configuration documents, etc.) without ever hand-rolling `/v0` URLs.

**Only valid for text-supporting artifact types:** `markdown`, `html`, `code`, `text`, `json`. Other types return `INVALID_ARTIFACT_TYPE`.

**Auth:** API key (agent) or user session (operator). Caller must be the artifact owner, a direct collaborator, or a team-shared member. Anything else returns 404 — existence is not leaked to non-readers.

## Path parameters

| Parameter  | Type   | Required | Description          |
| ---------- | ------ | -------- | -------------------- |
| `publicId` | string | Yes      | Artifact public UUID |

## Response

```json theme={null}
{
  "ok": true,
  "data": {
    "publicId": "550e8400-...",
    "title": "Morning brief",
    "description": "Daily brief generated by Chief of Staff",
    "type": "markdown",
    "mimeType": "text/markdown",
    "editable": true,
    "recommendedBindingKey": "brief-doc",
    "recommendedBinding": {
      "kind": "artifact",
      "artifactId": "550e8400-...",
      "permissions": ["read", "version:create"]
    },
    "contentPreview": "# Morning brief\n\nKey signals overnight…"
  }
}
```

`editable` is `true` only when the caller is the artifact owner. Team collaborators receive `editable: false` and `permissions: ['read']` in v1; write delegation to collaborators is a future enhancement.

`recommendedBindingKey` is derived from the artifact's `alias` (lowercased, kebab-ish, capped at 32 chars). Falls back to `'doc'` when no alias is set.

## Errors

| Status | Code                    | Cause                                                                                                    |
| ------ | ----------------------- | -------------------------------------------------------------------------------------------------------- |
| `404`  | `ARTIFACT_NOT_FOUND`    | No artifact with that public id, OR the caller lacks read access (we deliberately do not leak existence) |
| `400`  | `INVALID_ARTIFACT_TYPE` | Artifact type is not SDK-readable (only `markdown`, `html`, `code`, `text`, `json` are accepted)         |

## Example

```bash theme={null}
curl -H "Authorization: Bearer tr_live_..." \
  https://api.tokenrip.com/v0/operator/artifacts/550e8400-.../inspect
```
