Skip to content
HTML/CSS to ImageDocs

Send every rendered image or PDF to a DigitalOcean Space you control.

HTML/CSS to Image connects to DigitalOcean Spaces through its S3-compatible API. HCTI derives the service endpoint from the Space’s region and authenticates with a Spaces access key and secret.

You need:

  • An existing DigitalOcean Space.
  • The Space’s region, such as nyc3, sfo3, or ams3.
  • An optional key prefix, such as hcti-renders.

The region appears at the beginning of the Spaces endpoint: https://<region>.digitaloceanspaces.com.

In the DigitalOcean control panel, open the Spaces Keys section and generate a new key.

  1. Give the key a recognizable name.
  2. Restrict it to the destination Space when possible.
  3. Grant object read, write, and delete access for the complete HCTI workflow.
  4. Copy the access key and secret. Save the secret when it is shown.

Write access is required for images and connection tests. Read access lets HCTI reload the original for a later resize, crop, or format conversion when Disable HCTI Storage is selected. Delete access only cleans up connection-test objects; HCTI does not delete your rendered images.

If you configure both a scoped key and an HCTI key prefix, make sure the key’s permitted object path includes that same prefix.

Open the Storage Destinations dashboard, click Add storage destination, and enter:

HCTI field DigitalOcean value
Provider DigitalOcean Spaces
Bucket Existing Space name
Key prefix Optional folder-like prefix, without leading or trailing slashes
Region Space region, such as nyc3
Access key ID Spaces access key
Secret access key Spaces secret key

Click Test connection, then enable and save the destination after the test succeeds. Copy the destination id for your API requests.

The test writes a small object under <key-prefix>/.hcti/connection-tests/. Cleanup is best-effort, so missing delete access does not make a successful write test fail.

Pass the destination ID as storage_destination_id when you create an image:

Terminal window
curl -X POST https://hcti.io/v1/image \
-u 'user-id:api-key' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com",
"storage_destination_id": "your-storage-destination-id"
}'

Rendering is lazy. With normal HCTI storage enabled, request the returned image URL to render the image and upload the Spaces copy. With Disable HCTI Storage selected, send an authenticated PUT request to the returned /v1/store/... URL.

The base object is stored as <key-prefix>/<image-id>.png, or .pdf when the request uses pdf_options. HCTI does not change the Space’s file permissions or CDN configuration.

Troubleshooting DigitalOcean Spaces uploads

Section titled “Troubleshooting DigitalOcean Spaces uploads”
  • The connection test cannot find the Space — Confirm the Space name and the region at the beginning of its endpoint.
  • Authentication fails — Use a Spaces key pair, not a DigitalOcean personal access token.
  • A scoped key returns Access Denied — Confirm that it grants write access to the Space and to the configured prefix.
  • A later transformation fails with HCTI Storage disabled — Add object read access.
  • Connection-test objects remain — Add object delete access for .hcti/connection-tests/.

DigitalOcean documents the Spaces S3-compatible API, endpoints, and permission levels.

You can also automate configuration through the Storage destinations API or MCP tools.

Need help?

Talk to a human. Email support@htmlcsstoimage.com and we’ll help you get started.