---
canonical: 'https://htmlcsstoimage.com/features/custom-storage'
title: 'Save Generated Images to S3 or R2 | HTML/CSS to Image'
description: 'Store generated images in Amazon S3, Cloudflare R2, or other S3-compatible buckets. Manage destinations through REST or MCP with built-in connection checks.'
---

# Send generated images directly to your object storage

Connect your bucket once, then use the destination's ID in an image request. Keep generated images in your account, behind your CDN, and under your existing access and retention policies.

## Key capabilities

- S3-compatible providers
- Reusable destination IDs
- Disable HCTI storage

## Manage storage destinations through the REST API or MCP

HTML/CSS to Image supports the following storage destination operations through REST and MCP. Both interfaces enforce the same permissions and connection checks.

| Operation | REST endpoint | MCP tool | Required permission |
| --- | --- | --- | --- |
| Create | `POST /v1/storage-destinations` | `create_storage_destination` | `storage_destinations:create_update` |
| Update | `POST /v1/storage-destinations/{id}` | `update_storage_destination` | `storage_destinations:create_update` |
| List | `GET /v1/storage-destinations` | `list_storage_destinations` | `storage_destinations:read` |
| Get | `GET /v1/storage-destinations/{id}` | `get_storage_destination` | `storage_destinations:read` |
| Delete | `DELETE /v1/storage-destinations/{id}` | `delete_storage_destination` | `storage_destinations:delete` |

MCP grants must be approved by the user. Plan requirements and rate limits apply to both interfaces.

### Connection validation

Creation tests write access before saving an enabled destination. Changing a connection or re-enabling a destination triggers a new write test; metadata-only updates do not. Inspect the returned test status. For Amazon S3, `GET /v1/storage-destinations/aws-external-id` or the `get_aws_storage_external_id` MCP tool returns the organization's external ID for the IAM role trust policy; this requires create/update permission.

### Updating credentials

Updates replace the configuration. Responses never return secret access keys. For key-based connections, supply a replacement secret or explicitly set `retain_secret_access_key: true` in `connection_info` with the same provider and access key ID. Omitting the secret does not automatically preserve it. Do not send both a secret and a retention request. Keep secrets out of chat prompts; use the dashboard or a secure API workflow to configure credentials when appropriate.

See the [storage destination API reference](https://docs.htmlcsstoimage.com/management-api/storage-destinations/) for provider-specific request fields and validation behavior, or the [storage destination MCP tools](https://docs.htmlcsstoimage.com/integrations/mcp/tools/#storage-destinations) for tool parameters.

## Connect your existing object storage

Configure Amazon S3, Cloudflare R2, Google Cloud Storage, Backblaze B2, DigitalOcean Spaces, Wasabi, or an S3-compatible HTTPS endpoint that HCTI can reach over the public internet. Custom storage destinations are available on plans with 10,000 images per month or more; see [pricing](https://htmlcsstoimage.com/pricing.md) for current plan details.

Provider setup guides:

- [Amazon S3](https://docs.htmlcsstoimage.com/guides/advanced/storage-destinations/s3/)
- [Cloudflare R2](https://docs.htmlcsstoimage.com/guides/advanced/storage-destinations/r2/)
- [Backblaze B2](https://docs.htmlcsstoimage.com/guides/advanced/storage-destinations/backblaze-b2/)
- [DigitalOcean Spaces](https://docs.htmlcsstoimage.com/guides/advanced/storage-destinations/digitalocean-spaces/)
- [Wasabi](https://docs.htmlcsstoimage.com/guides/advanced/storage-destinations/wasabi/)
- [Google Cloud Storage](https://docs.htmlcsstoimage.com/guides/advanced/storage-destinations/google-cloud-storage/)
- [Other S3-compatible services](https://docs.htmlcsstoimage.com/guides/advanced/storage-destinations/s3-compatible/)

HCTI assigns the saved destination an opaque ID. Copy it from the dashboard or obtain it with `list_storage_destinations`, then send it in the image request:

```json
{
  "storage_destination_id": "rK4mQ9xP"
}
```

Generated images arrive in your bucket, where your existing CDN, lifecycle rules, access policies, and image processing can handle them. If **Disable HCTI Storage** is enabled on the destination, HCTI still processes the render and retains its settings and metadata, but does not retain the rendered file, cache it on the HCTI CDN, or provide a public HCTI image URL. The setting is captured when each image is created and does not change existing images.

## MCP Integration

Connect an MCP-compatible client to `https://mcp.hcti.io` with OAuth. The tools use the connected organization's HTML/CSS to Image account, permissions, and plan limits.

- The `list_storage_destinations` tool returns the organization's available storage destinations, if any, with IDs and without sensitive connection details. Use an enabled ID as `storage_destination_id` when generating an image or PDF.

[Read the full MCP docs](https://docs.htmlcsstoimage.com/integrations/mcp/).

## Use your existing bucket, CDN, and retention policies

### Storage in your account

Write generated images to the bucket and cloud account your team already manages.

### CDN and image processing

Use your existing CDN, lifecycle rules, access policies, and image transformations without copying files between systems.

### S3-compatible providers

Connect Amazon S3, Cloudflare R2, Google Cloud Storage, or an S3-compatible HTTPS endpoint that HCTI can reach over the public internet.

### Disable HCTI Storage

Enable this setting on a destination to prevent HCTI from retaining the rendered file for new images that use it; HCTI still retains image settings and metadata.

## Related features

- [Security](https://htmlcsstoimage.com/features/security.md): Options to secure your renders.
- [Organizations](https://htmlcsstoimage.com/features/organizations.md): Give your team access without per-seat charges.

## Get started

REST API requests require an HTML/CSS to Image account and should be authenticated from trusted application code. Check the API docs and pricing for current setup instructions, limits, and feature availability.

- [View the full feature page](https://htmlcsstoimage.com/features/custom-storage)
- [Browse all features](https://htmlcsstoimage.com/features.md)
- [View pricing](https://htmlcsstoimage.com/pricing.md)
- [Read the storage destination docs](https://docs.htmlcsstoimage.com/guides/advanced/storage-destinations/)
- [Read the MCP docs](https://docs.htmlcsstoimage.com/integrations/mcp/)
