---
title: "Create a batch of images"
method: POST
path: "/v1/image/batch"
tags: ["Images"]
---

# Create a batch of images

`POST /v1/image/batch`

## Request body

- BatchImageRequest
  - `default_options` BaseImageRequest — Image request containing all available properties. Batch variations override matching values supplied here.
    - `css` string, nullable — Optional CSS for either image source. With `html`, it styles the supplied markup; with `url`, it is injected after the page loads to override page styles.
    - `device_scale` number, double, nullable — Adjusts the pixel ratio used for the screenshot. Minimum: 0.1. Maximum: 3. HTML and template renders default to 2; URL renders default to 1.
    - `full_screen` boolean, nullable — Take a screenshot of the entire screen after scrolling down and back to the top.
    - `google_fonts` string, nullable — Google fonts to load. Separate multiple fonts with a pipe, such as 'Roboto|OpenSans', and set font-family in the CSS to use them.
    - `html` string, nullable — HTML to render and take a screenshot of. HTML fragments are rendered in a wrapper document unless a complete HTML document is supplied. Required for HTML image requests.
    - `max_wait_ms` integer, nullable — Sets a limit on how long to wait before taking the screenshot when the page continues loading irrelevant content. Minimum: 500. Maximum: 10000 and subject to the account plan limit.
    - `metadata` object, nullable — Custom key-value metadata stored with the image.
    - `ms_delay` integer, nullable — Adds extra time in milliseconds before taking the screenshot so JavaScript can execute. Minimum: 0. Maximum: 10000.
    - `render_when_ready` boolean, nullable — Waits until the page signals that the screenshot is ready. The image fails if the readiness signal is never sent.
    - `selector` string, nullable — A CSS selector for an element in the HTML. We’ll crop the image to this specific element.
    - `template_values` JsonObject
    - `url` string, nullable — URL to capture for this batch item. After default options and a variation are merged, a non-empty `url` takes precedence over `html`; omit it to render the merged `html` instead.
    - `viewport_height` integer, nullable — Sets the height of Chrome's viewport and disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together.
    - `viewport_width` integer, nullable — Sets the width of Chrome's viewport and disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together.
    - `pdf_options` PDFOptions
      - `page_height` string, nullable — Height of the page, with unit (px, in, cm, mm, pt)
      - `page_width` string, nullable — Width of the page, with unit (px, in, cm, mm, pt)
      - `scale` number, double, nullable — Scale of the webpage rendering. Defaults to 1.
      - `margins` string[], nullable — Margins of the webpage rendering. Defaults to 0. 4 values must be supplied: top, right, bottom, left. Units are px, cm, in, mm, or pt.
      - `print_background` boolean — Print background graphics.
    - `disable_twemoji` boolean, nullable — Disables the Twemoji fallback and renders emoji using native fonts instead.
    - `dedupe_duration_s` integer, nullable — Reuse an existing image with identical content if it was created within this many seconds. Minimum: 0. Maximum: 31536000. Availability and maximum effective duration depend on the account plan.
    - `max_render_once` boolean, nullable — Ensure the image is only ever rendered and saved one time. This is an advanced option not applicable to most requests.
    - `color_scheme` unknown
    - `timezone` string, nullable — Sets the IANA timezone used by Chrome while rendering. Must be a recognized IANA timezone identifier.
    - `block_consent_banners` boolean, nullable — Attempt to block cookie/consent banners from displaying.
    - `identify_as_hcti` boolean, nullable — Identify the top-level page navigation as an HCTI screenshot request using the X-HCTI-SCREENSHOT header.
    - `headers` object, nullable — HTTP headers to include on top-level page navigations to the requested URL's origin and any additional_header_origins. Supports up to 20 headers with names up to 512 ASCII characters and values up to 8192 UTF-8 bytes. For GET and form-encoded requests, repeat this parameter using the format `headers=name:value`.
    - `additional_header_origins` string[], nullable — Additional exact HTTP or HTTPS origins allowed to receive custom headers. Supports up to 20 unique origins of up to 512 UTF-8 bytes each. Origins must use the format scheme://host[:port] without a path; duplicates are ignored. For GET and form-encoded requests, repeat this parameter for each origin.
    - `include_headers_on_subrequests` boolean, nullable — Include custom headers on subrequests to the requested URL's origin and any additional_header_origins. Defaults to false. Requires at least one header.
    - `viewport_mobile` boolean, nullable — Specifies whether the page uses mobile viewport behavior, including its viewport meta tag.
    - `viewport_landscape` boolean, nullable — Specifies whether the emulated viewport is in landscape orientation.
    - `viewport_touch` boolean, nullable — Specifies whether the emulated viewport supports touch events.
    - `media_type` unknown
    - `proxy_id` string, nullable — Specifies which configured organization proxy to use when rendering.
    - `storage_destination_id` string, nullable — Specifies which configured organization storage destination receives the rendered image.
    - `jumbo_max_height` integer, nullable — Maximum height of the rendered image in jumbo mode. Jumbo rendering consumes additional renders and requires jumbo_max_width. Supply both jumbo dimensions. Each must be greater than 0 and no more than 80000; at least one must exceed 8000; total area cannot exceed 400000000 pixels.
    - `jumbo_max_width` integer, nullable — Maximum width of the rendered image in jumbo mode. Jumbo rendering consumes additional renders and requires jumbo_max_height. Supply both jumbo dimensions. Each must be greater than 0 and no more than 80000; at least one must exceed 8000; total area cannot exceed 400000000 pixels.
    - `transparent_background` boolean, nullable — Specifies whether the image is rendered with a transparent background.
    - `format` unknown
  - `variations` ImageRequest[]
    - union
      - object
        - `html` string, required — HTML to render and take a screenshot of. HTML fragments are rendered in a wrapper document unless a complete HTML document is supplied. Required for HTML image requests.
        - `css` string, nullable — CSS used to style the rendered HTML.
        - `device_scale` number, double, nullable — Adjusts the pixel ratio used for the screenshot. Minimum: 0.1. Maximum: 3. HTML and template renders default to 2; URL renders default to 1.
        - `google_fonts` string, nullable — Google fonts to load. Separate multiple fonts with a pipe, such as 'Roboto|OpenSans', and set font-family in the CSS to use them.
        - `max_wait_ms` integer, nullable — Sets a limit on how long to wait before taking the screenshot when the page continues loading irrelevant content. Minimum: 500. Maximum: 10000 and subject to the account plan limit.
        - `metadata` object, nullable — Custom key-value metadata stored with the image.
        - `ms_delay` integer, nullable — Adds extra time in milliseconds before taking the screenshot so JavaScript can execute. Minimum: 0. Maximum: 10000.
        - `render_when_ready` boolean, nullable — Waits until the page signals that the screenshot is ready. The image fails if the readiness signal is never sent.
        - `selector` string, nullable — A CSS selector for an element in the HTML. We’ll crop the image to this specific element.
        - `viewport_height` integer, nullable — Sets the height of Chrome's viewport and disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together.
        - `viewport_width` integer, nullable — Sets the width of Chrome's viewport and disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together.
        - `pdf_options` PDFOptions
          - `page_height` string, nullable — Height of the page, with unit (px, in, cm, mm, pt)
          - `page_width` string, nullable — Width of the page, with unit (px, in, cm, mm, pt)
          - `scale` number, double, nullable — Scale of the webpage rendering. Defaults to 1.
          - `margins` string[], nullable — Margins of the webpage rendering. Defaults to 0. 4 values must be supplied: top, right, bottom, left. Units are px, cm, in, mm, or pt.
          - `print_background` boolean — Print background graphics.
        - `disable_twemoji` boolean, nullable — Disables the Twemoji fallback and renders emoji using native fonts instead.
        - `dedupe_duration_s` integer, nullable — Reuse an existing image with identical content if it was created within this many seconds. Minimum: 0. Maximum: 31536000. Availability and maximum effective duration depend on the account plan.
        - `max_render_once` boolean, nullable — Ensure the image is only ever rendered and saved one time. This is an advanced option not applicable to most requests.
        - `color_scheme` unknown
        - `timezone` string, nullable — Sets the IANA timezone used by Chrome while rendering. Must be a recognized IANA timezone identifier.
        - `viewport_mobile` boolean, nullable — Specifies whether the page uses mobile viewport behavior, including its viewport meta tag.
        - `viewport_landscape` boolean, nullable — Specifies whether the emulated viewport is in landscape orientation.
        - `viewport_touch` boolean, nullable — Specifies whether the emulated viewport supports touch events.
        - `media_type` unknown
        - `proxy_id` string, nullable — Specifies which configured organization proxy to use when rendering.
        - `storage_destination_id` string, nullable — Specifies which configured organization storage destination receives the rendered image.
        - `jumbo_max_height` integer, nullable — Maximum height of the rendered image in jumbo mode. Jumbo rendering consumes additional renders and requires jumbo_max_width. Supply both jumbo dimensions. Each must be greater than 0 and no more than 80000; at least one must exceed 8000; total area cannot exceed 400000000 pixels.
        - `jumbo_max_width` integer, nullable — Maximum width of the rendered image in jumbo mode. Jumbo rendering consumes additional renders and requires jumbo_max_height. Supply both jumbo dimensions. Each must be greater than 0 and no more than 80000; at least one must exceed 8000; total area cannot exceed 400000000 pixels.
        - `transparent_background` boolean, nullable — Specifies whether the image is rendered with a transparent background.
        - `format` unknown
      - object
        - `url` string, required — Public HTTP or HTTPS URL to capture. Required for URL image requests.
        - `css` string, nullable — CSS injected into the loaded URL to override styles on the page.
        - `device_scale` number, double, nullable — Adjusts the pixel ratio used for the screenshot. Minimum: 0.1. Maximum: 3. HTML and template renders default to 2; URL renders default to 1.
        - `full_screen` boolean, nullable — Take a screenshot of the entire screen after scrolling down and back to the top.
        - `max_wait_ms` integer, nullable — Sets a limit on how long to wait before taking the screenshot when the page continues loading irrelevant content. Minimum: 500. Maximum: 10000 and subject to the account plan limit.
        - `metadata` object, nullable — Custom key-value metadata stored with the image.
        - `ms_delay` integer, nullable — Adds extra time in milliseconds before taking the screenshot so JavaScript can execute. Minimum: 0. Maximum: 10000.
        - `render_when_ready` boolean, nullable — Waits until the page signals that the screenshot is ready. The image fails if the readiness signal is never sent.
        - `selector` string, nullable — A CSS selector for an element in the HTML. We’ll crop the image to this specific element.
        - `viewport_height` integer, nullable — Sets the height of Chrome's viewport and disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together.
        - `viewport_width` integer, nullable — Sets the width of Chrome's viewport and disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together.
        - `pdf_options` PDFOptions
          - `page_height` string, nullable — Height of the page, with unit (px, in, cm, mm, pt)
          - `page_width` string, nullable — Width of the page, with unit (px, in, cm, mm, pt)
          - `scale` number, double, nullable — Scale of the webpage rendering. Defaults to 1.
          - `margins` string[], nullable — Margins of the webpage rendering. Defaults to 0. 4 values must be supplied: top, right, bottom, left. Units are px, cm, in, mm, or pt.
          - `print_background` boolean — Print background graphics.
        - `disable_twemoji` boolean, nullable — Disables the Twemoji fallback and renders emoji using native fonts instead.
        - `dedupe_duration_s` integer, nullable — Reuse an existing image with identical content if it was created within this many seconds. Minimum: 0. Maximum: 31536000. Availability and maximum effective duration depend on the account plan.
        - `max_render_once` boolean, nullable — Ensure the image is only ever rendered and saved one time. This is an advanced option not applicable to most requests.
        - `color_scheme` unknown
        - `timezone` string, nullable — Sets the IANA timezone used by Chrome while rendering. Must be a recognized IANA timezone identifier.
        - `block_consent_banners` boolean, nullable — Attempt to block cookie/consent banners from displaying.
        - `identify_as_hcti` boolean, nullable — Identify the top-level page navigation as an HCTI screenshot request using the X-HCTI-SCREENSHOT header.
        - `headers` object, nullable — HTTP headers to include on top-level page navigations to the requested URL's origin and any additional_header_origins. Supports up to 20 headers with names up to 512 ASCII characters and values up to 8192 UTF-8 bytes. For GET and form-encoded requests, repeat this parameter using the format `headers=name:value`.
        - `additional_header_origins` string[], nullable — Additional exact HTTP or HTTPS origins allowed to receive custom headers. Supports up to 20 unique origins of up to 512 UTF-8 bytes each. Origins must use the format scheme://host[:port] without a path; duplicates are ignored. For GET and form-encoded requests, repeat this parameter for each origin.
        - `include_headers_on_subrequests` boolean, nullable — Include custom headers on subrequests to the requested URL's origin and any additional_header_origins. Defaults to false. Requires at least one header.
        - `viewport_mobile` boolean, nullable — Specifies whether the page uses mobile viewport behavior, including its viewport meta tag.
        - `viewport_landscape` boolean, nullable — Specifies whether the emulated viewport is in landscape orientation.
        - `viewport_touch` boolean, nullable — Specifies whether the emulated viewport supports touch events.
        - `media_type` unknown
        - `proxy_id` string, nullable — Specifies which configured organization proxy to use when rendering.
        - `storage_destination_id` string, nullable — Specifies which configured organization storage destination receives the rendered image.
        - `jumbo_max_height` integer, nullable — Maximum height of the rendered image in jumbo mode. Jumbo rendering consumes additional renders and requires jumbo_max_width. Supply both jumbo dimensions. Each must be greater than 0 and no more than 80000; at least one must exceed 8000; total area cannot exceed 400000000 pixels.
        - `jumbo_max_width` integer, nullable — Maximum width of the rendered image in jumbo mode. Jumbo rendering consumes additional renders and requires jumbo_max_height. Supply both jumbo dimensions. Each must be greater than 0 and no more than 80000; at least one must exceed 8000; total area cannot exceed 400000000 pixels.
        - `transparent_background` boolean, nullable — Specifies whether the image is rendered with a transparent background.
        - `format` unknown
      - object
        - `template_values` JsonObject, required
        - `format` unknown

## Response `200`

OK

- BatchImageResult
  - `images` ImageResultWithId[], required
    - `url` string
    - `id` string

## Other responses

- `400` — Bad Request
- `402` — Payment Required
- `403` — Forbidden

---

[API](https://skmtc.dev/htmlcsstoimage/apis/html-css-to-image-api.md) · [All operations](https://skmtc.dev/htmlcsstoimage/apis/html-css-to-image-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/htmlcsstoimage/html-css-to-image-api/revisions/07d679e7b124/schema)
