跳转到主要内容
POST
Create Image

请求规范

  • 方法与路径: POST /apis/v1/htmlcss-to-image/create-image
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/htmlcss-to-image/create-image
  • Runtime 事实版本: ecf7b25fc395f7aff68b9e1c0588b3d9a8bb0e613a7bdfd59ede194deb499492
完整 OpenAPI 定义 有效请求与价格声明(包括认证和引用的 schema):

费用与请求规则

按用量计费;默认请求预估费用:$0.0143 USD(不是固定价格)。 声明的单位费率:每 provider_credit $0.000001 USD。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。
  • 默认请求参考估价(USD): 0.0143
  • 声明的单位费率(USD): 1e-06
  • 计费单位: provider_credit
  • 计费依据: response_units
  • 公开参考倍率: 1.0
  • 声明的最大计数或单位数: 10000000
  • 结算证据来源: response_body

授权

Authorization
string
header
必填

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

请求体

application/json
html
string
必填

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

Minimum string length: 1
示例:

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

ms_delay
integer
必填

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

必填范围: 1 <= x <= 10000
media_type
enum<string>
必填

CSS media type used while rendering: screen or print.

可用选项:
screen
render_when_ready
enum<boolean>
必填

Wait until the page signals that rendering is ready.

可用选项:
false
css
string

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

示例:

".card { padding: 24px; }"

url
string

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

示例:

"https://example.com"

headers
object

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

示例:
selector
string

CSS selector for the element to capture.

示例:

"#invoice"

timezone
string

IANA timezone exposed to the rendered page.

示例:

"America/New_York"

full_screen
boolean
默认值:false

Capture the full scrollable page instead of only the viewport.

max_wait_ms
integer

Maximum wait from 500 to 10000 milliseconds for page loading.

必填范围: 500 <= x <= 10000
color_scheme
enum<string>

Preferred browser color scheme: light or dark.

可用选项:
light,
dark
device_scale
number
默认值:2

Device scale factor from 0.1 to 3.

必填范围: 0.1 <= x <= 3
google_fonts
string[]

Google Font family names to load while rendering.

示例:
viewport_width
integer

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

必填范围: 1 <= x <= 6000
viewport_height
integer

Viewport height in pixels. Requires viewport_width.

必填范围: x >= 1
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).

必填范围: x >= 0

Attempt to block common consent banners.

transparent_background
boolean
默认值:false

Render a transparent background where supported.

additional_header_origins
string[]

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

Maximum array length: 20
示例:
include_headers_on_subrequests
boolean
默认值:false

Also include supplied headers on page subrequests.

响应

Tool result data

id
string
必填
url
string
必填