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

# Apple Shortcuts Integration

> Use refile with Apple Shortcuts

Use Apple Shortcuts to generate PDFs from markdown using refile's API directly from your iOS or macOS device.

## Demo Shortcut

Get started quickly by installing our demo shortcut:

[Install refile Demo Shortcut](https://www.icloud.com/shortcuts/fdee23674b6b4f32b92465831ab868c8)

## Creating Your Own Shortcut

Follow these steps to create a custom refile shortcut:

1. Open the Shortcuts app on your iOS or macOS device
2. Create a new shortcut
3. Add a "Text" action to input your markdown content
4. Add a "Get Contents of URL" action with the following settings:
   * URL: `https://www.refile.co/api/v1/pdf/markdown`
   * Method: POST
   * Headers:
     * Name: `Authorization`
     * Value: `Bearer YOUR_API_KEY` (replace with your actual API key)
   * Request Body: JSON
   * JSON:
   ```json theme={null}
   {
   	"markdown": "[Shortcut Input]",
   	"output": "binary",
   	"theme": "modern"
   }
   ```
5. (optional) Add a "Quick Look" action to preview the PDF

## Customization Options

You can customize your shortcut by modifying the JSON payload:

* **theme**: Choose from various [themes](/essentials/themes)
* **pageNumeration**: Add page numbers with "center", "left", "right" or "none"
* **pageSize**: Set page dimensions like "A4", "Letter", "Legal"
* **output**: Use "url" to get a download link or "binary" for direct PDF data

See the [API documentation](/api-reference/generate-pdf-from-markdown) for all available options.
