Get an API Key Demo

StarkRender API

Convert HTML to images, screenshots, and PDFs — fast, headless, production-ready.

Overview

StarkRender is an HTTP API that uses a headless Chromium browser to render HTML into pixel-perfect images (PNG or JPG) and PDFs. You can pass raw HTML, a public URL, or a saved template — and get back a hosted file URL in seconds.

EndpointDescription
POST /v1/renderRender HTML or a saved template into PNG/JPG
POST /v1/screenshotOpen a public URL and capture a screenshot
POST /v1/pdfConvert HTML into a downloadable PDF
POST /v1/templateSave a reusable HTML template with {{variables}}
GET /v1/template/{id}Retrieve a saved template
DELETE /v1/template/{id}Delete a saved template

Authentication

All requests require an x-api-key header. Requests without a valid key return 401 Unauthorized.

HTTP Header
x-api-key: YOUR_API_KEY
ℹ️
Contact italo@aprovacapital.com.br to request an API key.

Quick Start

Render your first image in under 60 seconds. Send an HTML fragment and get back a hosted image URL.

1. Make the request

cURL
curl -X POST https://api.starkrender.com/v1/render \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<div style=\"background:#0f172a;width:800px;height:400px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:40px;font-family:sans-serif\">Hello StarkRender</div>",
    "width": 800,
    "height": 400
  }'

2. Get the image URL

JSON Response
{
  "status": "success",
  "image_url": "https://api.starkrender.com/static/uuid.png"
}

Other language examples

JavaScript
// Node.js / browser fetch
const res = await fetch('https://api.starkrender.com/v1/render', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    html: '<div style="...">Hello</div>',
    width: 1080,
    height: 1080,
  }),
});
const { image_url } = await res.json();
Python
import requests

response = requests.post(
    "https://api.starkrender.com/v1/render",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "html": "<div style='...'>Hello</div>",
        "width": 1080,
        "height": 1080,
    },
)
image_url = response.json()["image_url"]
PHP
$ch = curl_init('https://api.starkrender.com/v1/render');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['x-api-key: YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode(['html' => '...', 'width' => 1080, 'height' => 1080]),
]);
$data = json_decode(curl_exec($ch), true);
$image_url = $data['image_url'];

Base URL

Base URL
https://api.starkrender.com

All endpoints accept Content-Type: application/json and return JSON. Generated files are hosted at https://api.starkrender.com/static/{uuid}.png and are available for 30 days before automatic cleanup.

On This Page
Overview Authentication Quick Start Base URL