---
title: Paperclip
icon: paperclip
description: Set up the Paperclip resource in Python.
---

## Dependencies

No additional dependencies - uses `requests` (included).

For credential setup, see the [Paperclip Setup](/home/setup/paperclip) guide.

## Configuration

```python
from mirage import MountMode, Workspace
from mirage.resource.paperclip import PaperclipConfig, PaperclipResource

config = PaperclipConfig()
resource = PaperclipResource(config=config)
ws = Workspace({"/paperclip": resource}, mode=MountMode.READ)
```

## Config Reference

| Field              | Required | Default                         | Description                     |
| ------------------ | -------- | ------------------------------- | ------------------------------- |
| `base_url`         | No       | `https://paperclip.gxl.ai`      | Paperclip API base URL          |
| `credentials_path` | No       | `~/.paperclip/credentials.json` | Path to credentials file        |
| `default_limit`    | No       | `500`                           | Max papers returned per listing |

## Custom Server

For self-hosted Paperclip instances, override `base_url` and point
`credentials_path` to the credentials file issued by your server:

```python
from mirage import MountMode, Workspace
from mirage.resource.paperclip import PaperclipConfig, PaperclipResource

config = PaperclipConfig(
    base_url="https://paperclip.internal.example.com",
    credentials_path="~/.paperclip/internal-credentials.json",
)
resource = PaperclipResource(config=config)
ws = Workspace({"/paperclip": resource}, mode=MountMode.READ)
```
