Back to services
API OverviewDocument Automation

HTML to Image Render API

Renders supplied HTML and CSS into an image.

When to use this API

HTML to Image Render API turns HTML templates into image output suitable for notifications, social cards, reporting snapshots and operational previews. It supports both single capture and paged rendering modes.

  • You need image output generated from server-side HTML templates.
  • You want screenshot-like rendering without browser automation in your app.
  • You need API-managed rendering with metered usage.

Typical use cases

  • Social sharing cards and previews.
  • Operational snapshots for internal dashboards.
  • Automated visual reporting exports.

Billing model

HTML to Image billing is based on generated image pages. One generated image page equals one image_page service billing event; it is not billed as a generic API call.

  • single + viewport output counts as one generated image page.
  • single + fullPage output uses ceil(outputImageHeightPx / 3000) as the image-page billing quantity.
  • pages mode uses the number of generated image pages, and async multi-format jobs sum image-page quantity per final output format.

APIRAPTOR token model

Tokens are APIRAPTOR's communication unit. One token equals 100 subtokens, and service usage is charged per service billing event.

  • Trial availability, token amount and duration come from Billing configuration.
  • Users have access to all services from day one; services are not premium-gated per plan.
  • HTML to Image uses the image_page service billing event for generated image pages.

Sync and async rendering

Sync mode uses POST /v1/html-to-image with mode=sync, or the default sync mode when mode is omitted. Async create uses the same POST endpoint with mode=async.

  • GET /v1/image/jobs/{jobId} returns async job status.
  • GET /v1/image/jobs/{jobId} returns async job status and file_id artifact references for authenticated API download.
  • The jobs endpoints are for status of an existing job, not for changing the billing model.

Input data

You send HTML content plus output format and render options such as viewport, scaling and pagination mode.

Output data

The API returns image binary output (single image or multi-page bundle depending on mode) and meters usage as generated image pages through the image_page service billing event.

How it works

  1. HTML is validated and rendered in an isolated render worker.
  2. Requested output mode and format options are applied.
  3. Generated image payload is returned and accounted as generated image pages through the image_page service billing event.

API documentation

Review endpoint parameters, request/response examples, error codes and execution notes in the technical API reference.

View API docs

Related APIs

Start using this service

Continue with endpoint details in documentation or open your workspace in the dashboard to run live requests.

Syncing service registry...