Available on RapidAPI

Ship code images.
Not headless Chrome.

A hosted API that renders syntax-highlighted code screenshots — with themes, window decorations, and line numbers — so you never have to run Puppeteer in production.

Running headless Chrome is painful

Code image generators exist. The hard part isn't the HTML — it's keeping the renderer alive in production.

🥶
Cold starts
Spinning up a Chromium process on every Lambda or Cloud Run invocation adds 3–8 seconds to your pipeline.
🔡
Font hell
Getting monospace fonts to load in a container — with correct ligatures — is a multi-hour distraction you won't miss.
💥
Memory spikes
Chromium is a memory hog. Concurrent screenshot requests OOM your container at the worst possible moment.
🔧
Constant maintenance
Browser updates, sandbox flags, new --args, different behavior across OS versions. None of that is your product.

Built for programmatic volume

Not for developers tweeting a snippet — for systems generating images at scale, automatically.

📰
Blog & newsletter pipelines
Auto-generate code images from MDX or Markdown at build time. No browser step in your CI, no Lambda layer to maintain.
🎓
Developer education platforms
Render lesson code snippets as polished images with correct themes and decorations, at the moment a course is published.
📚
Docs & changelog generators
Embed beautiful code previews directly in generated documentation without coupling your docs build to a headless browser.
🤖
AI content agents
LLM pipelines that produce code need a rendering step. One API call turns the output into a shareable image with no extra infrastructure.
📣
Social media bots
Automated posting pipelines for Twitter/X, LinkedIn, or Mastodon that need visually consistent code images on a schedule.
🖼️
OG image services
Generate open-graph preview images for code-sharing sites, paste tools, or repositories dynamically — no per-request Chrome instance.

One endpoint. One POST.

Send code, get a WebP image back. That's it.

curl
JavaScript
Python
curl -s -X POST "https://your-api.example.com/screenshot" \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -d '{
    "code": "const greet = (name: string) => `Hello, ${name}!`;\nconsole.log(greet(\"world\"));",
    "lang": "typescript",
    "theme": "github-dark",
    "decoration": "macos",
    "lineNumbers": true
  }' \
  --output screenshot.webp
const response = await fetch("https://your-api.example.com/screenshot", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-RapidAPI-Key": "YOUR_KEY",
  },
  body: JSON.stringify({
    code: "const greet = (name) => `Hello, ${name}!`;",
    lang: "typescript",
    theme: "github-dark",
    decoration: "macos",
    lineNumbers: true,
  }),
});

// response is a WebP image buffer
const imageBuffer = await response.arrayBuffer();
fs.writeFileSync("screenshot.webp", Buffer.from(imageBuffer));
import requests

response = requests.post(
    "https://your-api.example.com/screenshot",
    headers={
        "Content-Type": "application/json",
        "X-RapidAPI-Key": "YOUR_KEY",
    },
    json={
        "code": "def greet(name):\n    return f'Hello, {name}!'",
        "lang": "python",
        "theme": "dracula",
        "decoration": "macos",
        "lineNumbers": True,
    },
)

# response.content is the WebP image bytes
with open("screenshot.webp", "wb") as f:
    f.write(response.content)
FIELD TYPE DEFAULT DESCRIPTION
code string required Source code to render. Max 50 lines.
lang string required Language identifier (e.g. typescript, python, rust).
theme string github-light One of: github-light, github-dark, nord, dracula, one-dark-pro, catppuccin-mocha.
decoration string macos Window chrome style: macos, windows, or plain.
lineNumbers boolean false Show line numbers alongside code.

Everything you'd build yourself

We've handled the hard parts so you don't have to.

🎨
6 curated themes
GitHub Light/Dark, Nord, Dracula, One Dark Pro, Catppuccin Mocha — matched to real editor palettes.
🖥️
Window decorations
macOS traffic lights, Windows controls, or a plain border that matches the theme's color scheme.
🔢
Line numbers
Subtle, theme-aware line numbers that don't distract from the code itself.
📦
WebP output
Smaller than PNG, better quality than JPEG. Transparent background, no white box.
⚡
LRU cache
Identical requests return instantly from a 100 MB in-memory cache. No re-rendering on repeated calls.
🔤
Professional fonts
JetBrains Mono, Fira Code, Cascadia Code — with ligatures, loaded correctly every time.
🔒
Input validation
Zod schema with strict mode. Unknown fields are rejected. Code is sanitized before rendering.
🖼️
High resolution (PRO+)
2× device pixel ratio for crisp images that hold up at any size — ideal for retina displays.

Start free, scale as you need

All plans available on RapidAPI. No credit card required for BASIC.

BASIC
Free
Great for testing and low-volume projects.
100 image generations per month
Syntax highlighting
All themes & decorations
Line numbers
Standard resolution (1×)
Watermark on images
PRO
$9/month
For pipelines and automated workflows.
2000 image generations per month
Everything in BASIC
2× high-resolution output
No watermark
ULTRA
$29/month
High-volume generation with maximum quality.
10000 image generations per month
Everything in PRO
4× ultra-resolution output

Stop maintaining renderers.
Start shipping features.

Your first screenshots are free — no setup, no containers, no headaches.