✦ June 2026Batch rendering, template variables, async callbacks ve waitUntil parametresi eklendi.Docs'u gör →

renderpix API

Convert HTML/CSS to pixel-perfect images with a single API call. Base URL: https://renderpix.dev

Authentication

All requests require an API key via X-API-Key header:

curl -H "X-API-Key: rpx_your_key" https://renderpix.dev/v1/render

Get your key from the Dashboard. Also accepted as ?api_key=rpx_... query param.

Quick start

curl -X POST https://renderpix.dev/v1/render \
  -H "X-API-Key: rpx_your_key" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1 style=\"color:red\">Hello</h1>"}' \
  -o hello.png

POST/v1/render

Convert HTML/CSS to an image.

Request body (JSON)

ParameterTypeDefaultDescription
html requiredstringHTML/CSS to render
widthinteger1280Viewport width (1-3840)
heightinteger720Viewport height (1-2160)
formatstringpngpng, jpeg, or webp
qualityinteger90Quality for JPEG/WebP (1-100)
scalenumber1Device scale for Retina (0.5-3)
varsobjectKey-value pairs to replace {{key}} placeholders in HTML
waitUntilstringloadPage ready signal: load, domcontentloaded, or networkidle
callback_urlstringHTTPS URL to POST result to asynchronously (Pro+)
selectorstringCSS selector to capture element (Pro+)
fullPagebooleanfalseCapture full scrollable page (Pro+)

Response headers

HeaderDescription
X-Render-TimeDuration in ms
X-Usage-RemainingRemaining renders
X-Usage-LimitMonthly limit

GET/v1/screenshot

Screenshot any public URL.

curl "https://renderpix.dev/v1/screenshot?url=https://stripe.com&api_key=rpx_your_key" -o stripe.png

Query parameters

ParameterTypeDefaultDescription
url requiredstringURL to capture
widthinteger1280Viewport width
heightinteger720Viewport height
formatstringpngpng, jpeg, or webp
qualityinteger90Quality (JPEG/WebP)
fullPagebooleanfalseFull page capture

POST/v1/batch

Render multiple HTML items in a single API call. Each item is processed independently — a failed item doesn't affect others (partial failure support).

Plan limits: Free: not available  ·  Starter: max 10 items  ·  Pro: max 50 items  ·  Scale: max 100 items

Request

POST /v1/batch
X-API-Key: rpx_your_key
Content-Type: application/json

{
  "items": [
    {
      "html": "<div style='background:#1a1a2e;color:white;padding:40px;font-size:32px'>Slide 1</div>",
      "width": 1080,
      "height": 1350,
      "format": "png",
      "vars": { "title": "Slide 1" }
    },
    {
      "html": "<div style='background:#16213e;color:white;padding:40px;font-size:32px'>Slide 2</div>",
      "width": 1080,
      "height": 1350,
      "format": "jpeg",
      "quality": 85
    }
  ],
  "callback_url": "https://your-app.com/webhook"
}

Response — success (HTTP 200)

{
  "results": [
    {
      "index": 0,
      "success": true,
      "image": "data:image/png;base64,iVBORw0KGgo...",
      "format": "png",
      "width": 1080,
      "height": 1350,
      "duration_ms": 312
    },
    {
      "index": 1,
      "success": true,
      "image": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
      "format": "jpeg",
      "width": 1080,
      "height": 1350,
      "duration_ms": 287
    }
  ],
  "total": 2,
  "succeeded": 2,
  "failed": 0
}

Response — partial failure (HTTP 207)

{
  "results": [
    { "index": 0, "success": true, "image": "...", "duration_ms": 290 },
    { "index": 1, "success": false, "error": "Render timeout exceeded" }
  ],
  "total": 2,
  "succeeded": 1,
  "failed": 1
}

Error codes

StatusDescription
400items array empty or limit exceeded → {"error":"Batch limit exceeded. Your plan allows up to N items."}
403Free plan → {"error":"Batch rendering is not available on the Free plan."}

Template Variables

Inject dynamic content into HTML using {{key}} syntax. The vars object replaces each key-value pair in the HTML before rendering. Available on all plans.

Request example

POST /v1/render
X-API-Key: rpx_your_key
Content-Type: application/json

{
  "html": "<div style='font-family:sans-serif;padding:40px;background:#0f172a;color:white'>
             <h1 style='color:#22d3ee'>{{title}}</h1>
             <p>{{description}}</p>
             <span style='color:#a78bfa'>{{date}}</span>
           </div>",
  "width": 1200,
  "height": 630,
  "format": "png",
  "vars": {
    "title": "My Blog Post",
    "description": "An introduction to HTML-to-image APIs",
    "date": "June 2026"
  }
}

Notes

BehaviourDetail
Undefined keysLeft as-is in output: {{undefined_key}}{{undefined_key}}
Optionalvars is optional; omit it to render HTML as-is
Per-item in batchIn /v1/batch each item can carry its own vars object

Async Rendering

Pass a callback_url to start a render asynchronously. The API immediately returns 202 Accepted; when the render completes, it POSTs the result to your URL. Available on Pro and Scale plans.

Request

POST /v1/render
X-API-Key: rpx_your_key
Content-Type: application/json

{
  "html": "<div>...</div>",
  "width": 1200,
  "height": 630,
  "format": "png",
  "callback_url": "https://your-app.com/renderpix-webhook"
}

Immediate response (HTTP 202)

{
  "status": "accepted",
  "message": "Render started. Result will be posted to your callback_url."
}

Callback payload (POSTed to your webhook when render completes)

POST https://your-app.com/renderpix-webhook
Content-Type: application/json
X-RenderPix-Event: render.complete

{
  "success": true,
  "image": "data:image/png;base64,iVBORw0KGgo...",
  "format": "png",
  "width": 1200,
  "height": 630,
  "duration_ms": 834
}

Notes

BehaviourDetail
MethodCallback is a POST request with a 10-second timeout
ResilienceA failed callback does not cancel or retry the render
Plan requirementPro or Scale plan required; returns 403 on Free/Starter

waitUntil Parameter

Controls when Playwright considers the page ready before capturing the screenshot. Default: load. Available on all plans.

Values

ValueWhen to use
load (default)Fires after the window load event. Sufficient for most static HTML.
domcontentloadedFires as soon as the DOM is parsed, without waiting for external resources. Fastest option.
networkidleFires when network activity has been idle for 500 ms. Use for external fonts, CDN assets, or lazy-loaded content.

Example

{
  "html": "<link href='https://fonts.googleapis.com/...' rel='stylesheet'><div>...</div>",
  "width": 1200,
  "height": 630,
  "waitUntil": "networkidle"
}

GET/v1/og-image

Generate a ready-to-use Open Graph image from text. No HTML required. Authentication is optional — unauthenticated requests include a watermark and are limited to 10 requests/minute; authenticated requests count against your plan.

curl "https://renderpix.dev/v1/og-image?title=Hello+World&domain=mysite.com&theme=dark&api_key=rpx_your_key" -o og.png

Query parameters

ParameterTypeDefaultDescription
title requiredstringMain heading text
descstringSubtitle or description text
domainstringDomain label shown at the bottom (e.g. mysite.com)
themestringdarkColor theme: dark or light

Response is a 1200×630 PNG — the standard Open Graph image size.

Error codes

StatusErrorDescription
401missing_api_keyNo API key provided
401invalid_api_keyKey not found
429usage_limit_exceededMonthly limit reached
429rate_limitToo many requests
500render_failedRendering error

Rate limits & plan comparison

All plans: 100 requests/minute per API key.

FeatureFreeStarterProScale
Renders / month1002,00010,00050,000
Max resolution1280×7201920×21603840×21603840×2160
Max scale (DPR)
fullPage
selector (CSS crop)
Batch Rendering≤10 items≤50 items≤100 items
Async Callback
Template Variables
waitUntil