Skip to main content

VeilRender

PyPI version GitHub release CI Docker Pulls Docker Image License: MIT Live Demo

中文 | English

Headless browser rendering API — self-hostable on HF Spaces, Docker, or bare metal.

Try it now (no auth needed)

curl -X POST https://oaklight-veilrender-public.hf.space/render \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

VeilRender accepts a URL and returns the fully rendered page content (HTML, Markdown, readability-extracted article) using a headless Chromium browser. Designed as a fallback for fetch tools that fail on JavaScript-rendered pages.

Quick Start

Docker

docker run -p 7860:7860 -e VEILRENDER_API_TOKEN=your-secret oaklight/veilrender

Local Development

pip install -e ".[dev]"
playwright install chromium
python -m veilrender

API

GET /health

Returns {"status": "ok"} if the service is running.

POST /render

Render a URL and return the page content.

curl -X POST http://localhost:7860/render \
  -H "Authorization: Bearer your-secret" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

Response:

{
  "content": {
    "html": "...",
    "markdown": "...",
    "readability": "..."
  },
  "metadata": {
    "title": "Example Domain",
    "url": "https://example.com",
    "status_code": 200
  },
  "links": [{"url": "https://www.iana.org/domains/example", "text": "More information..."}]
}

POST /screenshot

Capture a screenshot of a URL.

curl -X POST http://localhost:7860/screenshot \
  -H "Authorization: Bearer your-secret" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}' \
  -o screenshot.png

Configuration

All settings are configured via environment variables with the VEILRENDER_ prefix:

Variable Default Description
VEILRENDER_API_TOKEN (none) API token for authentication. If unset, auth is disabled.
VEILRENDER_PORT 7860 Server port
VEILRENDER_HOST 0.0.0.0 Server bind address
VEILRENDER_TIMEOUT 30000 Browser navigation timeout (ms)
VEILRENDER_VIEWPORT_WIDTH 1280 Browser viewport width
VEILRENDER_VIEWPORT_HEIGHT 720 Browser viewport height
VEILRENDER_MAX_CONCURRENT 3 Max concurrent browser contexts

Benchmark

Tested on HF Spaces (free tier, 2 vCPU) and a self-hosted VPS (3 vCPU, 1 GB container). 100% success rate across all 46 requests per target.

Test HF Spaces Self-hosted
Sequential × 5 (mixed URLs) 8.72 s total 11.81 s total
Concurrent × 10 (mixed URLs) 1.40 – 9.37 s 1.29 – 13.45 s
Rapid-fire × 20 (sequential) 0.885 s avg 1.029 s avg
Peak container memory 614 MiB / 1 GB

Full results: BENCHMARK.md

License

MIT

Release files for veilrender 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for veilrender 0.4.0
File Size Uploaded
veilrender-0.4.0.tar.gz 635.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for veilrender 0.4.0
File Interpreter ABI Platform
veilrender-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / veilrender-0.4.0.tar.gz

Download URL veilrender-0.4.0.tar.gz
Size 635.5 kB
Tags Source
SHA-256 checksum
How to use checksums
88022760599755b0eab3965c1ae80943e06d355465fa3df4f46d688ca027e9f8
BLAKE2b-256 checksum
How to use checksums
31b9bb5472d07d5d23dee9e93b4cc97b0ca0aa8e47e8e1c6e4b650df999444c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / veilrender-0.4.0-py3-none-any.whl

Download URL veilrender-0.4.0-py3-none-any.whl
Size 642.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
834045932bb68a367bd0382fe4ffac739801f7905ab789f67990be2d8073e15e
BLAKE2b-256 checksum
How to use checksums
25243849a4dfcf37fafb2f5eeb5900c094d480382526202f3db5dbb086913f08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

This release

0.4.0 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page