Skip to main content
POST
Create Image

Request contract

  • Method and path: POST /apis/v1/htmlcss-to-image/create-image
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/htmlcss-to-image/create-image
Complete OpenAPI definition Effective request declaration (including authentication and referenced schemas):

Cost and request rules

Usage-based pricing. Default request estimate: $0.0143 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
html
string
required

HTML to render. Set this or url, but not both.

Minimum string length: 1
Example:

"<div class='card'>Hello</div>"

media_type
enum<string>
required

CSS media type used while rendering: screen or print.

Available options:
screen
ms_delay
integer
required

Extra render delay in milliseconds, from 0 to 10000. Zero omits the explicit delay.

Required range: 1 <= x <= 10000
render_when_ready
enum<boolean>
required

Wait until the page signals that rendering is ready.

Available options:
false
additional_header_origins
string[]

Up to 20 unique exact HTTP(S) origins that may also receive headers.

Maximum array length: 20
Example:

Attempt to block common consent banners.

color_scheme
enum<string>

Preferred browser color scheme: light or dark.

Available options:
light,
dark
css
string

CSS applied to supplied HTML or injected into a captured webpage.

Example:

".card { padding: 24px; }"

dedupe_duration_s
integer

Reuse a matching recent render for this many seconds. Allowed durations depend on the account plan; free accounts accept 0 or 2592000 (30 days).

Required range: x >= 0
device_scale
number
default:2

Device scale factor from 0.1 to 3.

Required range: 0.1 <= x <= 3
full_screen
boolean
default:false

Capture the full scrollable page instead of only the viewport.

google_fonts
string[]

Google Font family names to load while rendering.

Example:
headers
object

HTTP headers sent to the captured page, with at most 20 case-insensitive names.

Example:
include_headers_on_subrequests
boolean
default:false

Also include supplied headers on page subrequests.

max_wait_ms
integer

Maximum wait from 500 to 10000 milliseconds for page loading.

Required range: 500 <= x <= 10000
selector
string

CSS selector for the element to capture.

Example:

"#invoice"

timezone
string

IANA timezone exposed to the rendered page.

Example:

"America/New_York"

transparent_background
boolean
default:false

Render a transparent background where supported.

url
string

Absolute, internet-reachable HTTP(S) webpage URL to capture. Set this or html, but not both; use headers for authenticated pages.

Example:

"https://example.com"

viewport_height
integer

Viewport height in pixels. Requires viewport_width.

Required range: x >= 1
viewport_width
integer

Viewport width in pixels, from 1 to 6000. Requires viewport_height.

Required range: 1 <= x <= 6000

Response

Tool result data

id
string
required
url
string
required