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

# Cloudflare R2

> R2 como storage externo del usuario.

# Cloudflare R2

R2 es compatible con la API de S3. Puedes generar una signed URL con el SDK de AWS apuntando al endpoint de R2.

```ts theme={null}
const client = new S3Client({
  region: "auto",
  endpoint: `https://${process.env.CF_ACCOUNT_ID}.r2.cloudflarestorage.com`,
  credentials: {
    accessKeyId: process.env.R2_ACCESS_KEY_ID!,
    secretAccessKey: process.env.R2_SECRET_ACCESS_KEY!
  }
});
```

Despues usa `/convert/from-url` igual que con S3.

La API no necesita R2 propio. Si el usuario ya tiene R2, S3 o Supabase, solo recibe una URL temporal.
