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

# Saving to Cloudflare R2

> Deliver a PDF or image to a private R2 bucket with bucket-scoped S3 API credentials in DocKiln 1.1.

## Configure R2 delivery

1. Open R2 in your Cloudflare account. Copy the bucket name and the 32-character hexadecimal account ID.
2. Create an R2 credential with object read and write access restricted to the destination bucket. Copy its **Access Key ID** and **Secret Access Key**. Keep public bucket access disabled.
3. In the 1.1 review build, open **Settings → Object storage delivery** and select Cloudflare R2. Enter the account ID, bucket and key pair. Add a prefix such as `proofs/` if desired.

The [settings API](https://docs.dockiln.io/api-reference/configure-encrypted-s3-destination.md) uses `provider: "r2"`, `accountId`, `bucket`, `prefix`, `accessKeyId` and `secretAccessKey`. DocKiln derives the R2 endpoint from the account ID and signs with region `auto`. Settings reads omit the secret.

## Generate a proof

Send this body to [POST /v1/documents](https://docs.dockiln.io/api-reference/queue-generation.md).

```json theme={null}
{
  "html": "<h1>Packaging proof</h1><p>Revision three.</p>",
  "delivery": "object"
}
```

Follow the job status before looking for `proofs/<workspace-id>/<job-id>.pdf` in R2. Use the job's download path for authenticated access or request a [five-minute link](https://docs.dockiln.io/api-reference/sign-private-s3-download-for-five-minutes.md). For a delivery failure, verify that the access key belongs to the same account and has permission on this bucket.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.