Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计通过

htmlpixhtmlpix 测试

Agent Skill

htmlpix 用于辅助测试设计、自动化测试和回归验证,适合在 OpenClaw 中需要补充测试、分析失败日志或验证功能改动时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

11,784

周安装

501

GitHub Stars

公开资料未说明

下载量

4,128
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:htmlpix(htmlpix 测试)
来源仓库:https://github.com/jymaa/htmlpix
安装命令:
openclaw skills install htmlpix
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install htmlpix

简介

当用户想要调用、测试或集成 HTMLPix HTML 到图像 API 时使用 - 包括身份验证设置、签名 URL 铸造、图像渲染、模板 CRUD 等

SKILL.md

name
htmlpix-api
description
Use when the user wants to call, test, or integrate the HTMLPix HTML-to-image API — including auth setup, signed URL minting, image rendering, template CRUD, and AI template generation.

HTMLPix API Skill

Use the API contracts below when generating code, curl commands, SDK wrappers, or troubleshooting responses.

Base URL and Auth

  • API Base URL: https://api.htmlpix.com
  • Private endpoints require: Authorization: Bearer <API_KEY>
  • API keys are prefixed hpx_ and managed at https://htmlpix.com/api-keys
  • Do not call private endpoints from browser client code; mint URLs on the backend.

Authentication Flow

Every private request goes through this pipeline:

  1. Extract Authorization: Bearer <key> header
  2. Hash the key with SHA-256, look up by hash in the apiKeys table
  3. Verify key status is active (otherwise 403 KEY_INACTIVE)
  4. Query the user's subscription status from quotas table
  5. Subscription must be active, trialing, or canceled with time remaining

Error Codes

StatusCodeMeaning
401MISSING_API_KEYNo Authorization: Bearer header
401INVALID_API_KEYKey not found
403KEY_INACTIVEKey revoked or disabled
402NO_SUBSCRIPTIONNo quota record found
402SUBSCRIPTION_INACTIVESubscription expired or past_due
429QUOTA_EXCEEDEDMonthly mint quota exhausted

Endpoint Contracts

POST /v1/url (private)

Mint one signed image URL. The server resolves template variables, executes the template JSX, uploads the rendered VNode to Cloudflare R2/KV, and returns a signed URL pointing to the Cloudflare Worker that renders the final image.

Request JSON:

FieldTypeRequiredConstraints
templateIdstringyesmax 128 chars
widthintegerno1–4096, defaults to template value or 1200
heightintegerno1–4096, defaults to template value or 630
formatstringnopng, jpeg, or webp — defaults to template value or webp
qualityintegerno0–100, defaults to template value
devicePixelRationumbernopositive number, defaults to template value or 1
tvstringnomax 128 chars, cache-busting version tag — defaults to template updatedAt
variablesobjectnomax 64 keys, key max 64 chars, each value max 4000 chars serialized. Values can be string, number, boolean, null, array, or nested object.

Response 200:

{ "url": "https://image.htmlpix.com/v1/image?...&sig=...", "expiresAt": 1710345600000 }

Operational limits:

  • Body size max: 32 KB
  • Rate: 120 mint requests per 60s per API key
  • Concurrency: 4 in-flight per user
  • URLs expire after ~5 years by default

POST /v1/urls (private)

Mint multiple signed image URLs in one request.

Request JSON:

{ "items": [ /* each item has same shape as POST /v1/url */ ] }
  • items.length must be 1–25

Response 200:

{ "urls": [{ "templateId": "...", "url": "...", "expiresAt": 1710345600000 }] }

Operational limits:

  • Body size max: 256 KB

GET /v1/image (public, signed — served by Cloudflare Worker)

Requests to api.htmlpix.com/v1/image are 301-redirected to the Cloudflare Worker at image.htmlpix.com/v1/image. The Worker renders the image from VNode data stored in R2/KV.

Required query params:

ParamDescription
templateIdTemplate identifier
uidUser ID that minted the URL
expExpiry timestamp (unix ms)
sigHMAC signature — invalidated if any param changes

Optional query params:

ParamDefaultDescription
width1200Image width
height630Image height
formatwebppng, jpeg, or webp
quality0–100
dprDevice pixel ratio
tvCache version tag
rvRender version
v_<name>Template variables as v_title=Hello

Behavior:

  • 403 URL_EXPIRED — URL past expiry
  • 403 INVALID_SIGNATURE — params modified after signing
  • Returns image bytes with immutable caching headers and ETag
  • Supports 304 Not Modified via If-None-Match

Important: treat minted URLs as opaque. If any query value changes, signature validation fails.

GET /v1/templates (private)

List templates visible to the authenticated user.

Query params:

ParamDefaultValues
scopeallall, mine, starter

Response 200:

{ "templates": [ /* template objects */ ] }

POST /v1/templates (private)

Create a custom template. Templates are defined by a single code field containing JSX/TSX source code. The server compiles, validates, and extracts variables automatically.

Request JSON:

FieldTypeRequiredConstraints
namestringyesmax 120 chars
descriptionstringnomax 2000 chars
codestringyesmax 180,000 chars — JSX/TSX template source

Legacy fields jsx, variables, googleFonts, width, height, format are rejected with error code LEGACY_TEMPLATE_PAYLOAD. Use code only.

Response 201:

{ "templateId": "abc123..." }

Error responses:

  • 400 COMPILE_ERROR — JSX compilation or validation failed
  • 400 LEGACY_TEMPLATE_PAYLOAD — sent a deprecated field

GET /v1/templates/:templateId (private)

Fetch one template visible to the caller.

Response 200:

{ "template": { /* template object */ } }
  • 404 TEMPLATE_NOT_FOUND if not visible to caller

PATCH /v1/templates/:templateId (private)

Update template fields. At least one field required.

Request JSON:

FieldTypeRequiredConstraints
namestringnomax 120 chars
descriptionstringnomax 2000 chars
codestringnomax 180,000 chars — JSX/TSX template source

Legacy fields jsx, variables, googleFonts, width, height, format are rejected.

Response 200:

{ "templateId": "abc123..." }

Error responses:

  • 400 EMPTY_UPDATE — no updatable field provided
  • 400 COMPILE_ERROR — JSX compilation failed
  • 404 TEMPLATE_NOT_FOUND — template doesn't exist or not owned by caller

POST /v1/templates/generate (private)

AI-assisted template generation. Always uses batch format.

Request JSON:

{
  "items": [
    { "prompt": "A social card with bold title and gradient background", "width": 1200, "height": 630 }
  ]
}
FieldTypeRequiredConstraints
itemsarrayyes1–5 items
items[].promptstringyesmax 2000 chars
items[].widthintegerno1–4096, default 1200
items[].heightintegerno1–4096, default 630

Response 200:

{
  "results": [
    { "ok": true, "result": { /* generated template data */ } },
    { "ok": false, "error": "error message" }
  ]
}

Each item settles independently — some may succeed while others fail.

Error responses:

  • 429 QUOTA_EXCEEDED — AI generation quota hit
  • 402 SUBSCRIPTION_REQUIRED — paid plan needed
  • 422 PARSE_FAILED — AI output couldn't be parsed
  • 502 AI_NOT_CONFIGURED — AI provider not set up
  • 502 GENERATION_FAILED — generic AI failure

Safe Integration Pattern

  1. Keep API key server-side only.
  2. Mint with POST /v1/url or /v1/urls on your backend.
  3. Store/embed the returned url directly (meta tags, email HTML, social cards, etc.).
  4. Do not re-sign or mutate query params client-side.
  5. Handle 402, 429, and 503 with retries/fallback messaging.

Minimal Examples

# Mint a single image URL
curl -X POST https://api.htmlpix.com/v1/url \
  -H "Authorization: Bearer $HTMLPIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "tmpl_123",
    "variables": { "title": "Launch Day" },
    "width": 1200,
    "height": 630,
    "format": "png"
  }'
# List your templates
curl -X GET "https://api.htmlpix.com/v1/templates?scope=mine" \
  -H "Authorization: Bearer $HTMLPIX_API_KEY"
# Create a template from code
curl -X POST https://api.htmlpix.com/v1/templates \
  -H "Authorization: Bearer $HTMLPIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Social Card",
    "code": "export default function Template({ title }) {\
  return <div style={{ fontSize: 48 }}>{title}</div>\
}"
  }'
# AI-generate a template
curl -X POST https://api.htmlpix.com/v1/templates/generate \
  -H "Authorization: Bearer $HTMLPIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [{ "prompt": "Minimalist blog post OG image with title and author" }]
  }'

If the user asks for an endpoint not listed above, say it is not present in the current server route table and avoid inventing routes.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

83.99%
按下载量换算3,467

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills