Official CLI + MCP server · in Anthropic's MCP Registry

Pixel-perfect images,
from any code.

HTML, CSS, or code snippets in – PNG, JPG, or WebP out. The only render API with an official CLI on npm and an MCP server in Anthropic's registry. Free tier 50/mo (no watermark), paid from $9/mo or prepaid packs from $5.

Free plan: 50 clean renders/month, all formats, up to 2048×2048. No watermark, no credit card.
222
renders served
Live
API operational
3
CLI · MCP · REST
Why codetoimage

Built for the agent era.

REST API + CLI + MCP

Three interfaces, one engine. Drop into curl, Node, Python, n8n, Cursor, Claude Desktop.

Pixel-perfect rendering

Real headless Chromium with full CSS3 support – web fonts, gradients, animations frozen at any frame.

Sub-second response

Always-hot renderer (no cold starts). Median 600ms for typical 1200×630 OG images.

Built for agents

First-class MCP server. Add to Claude Desktop in 60 seconds. Your AI agent renders images autonomously.

Use cases

What people build with it.

Pricing

Simple. Pay for what you use.

1 render = 1 credit. Start free: 50 clean renders/month, full features, no watermark. Upgrade for volume, or top up with prepaid credit packs (from $5, valid 12 months). Plans: monthly or yearly (save 17%).

START HERE
Free
$0/mo
50 renders/month
  • ✓ No watermark
  • ✓ Up to 2048×2048
  • ✓ PNG / JPEG / WebP
  • ✓ API + CLI + MCP
  • ✓ Templates + presets
Start free
Starter
$9/mo
1,000 renders/month
  • ✓ Everything in Free
  • ✓ Higher rate limits
  • ✓ Credit packs stack on top
  • Email support
Get Starter
MOST POPULAR
Hobby
$19/mo
3,000 renders/month
  • ✓ Everything in Free
  • ✓ Higher rate limits
  • ✓ Credit packs stack on top
  • Email support
Get Hobby
Pro
$59/mo
15,000 renders/month
  • ✓ Everything in Free
  • ✓ Higher rate limits
  • ✓ Credit packs stack on top
  • Priority support
  • ✓ Webhook outbound
Get Pro
Scale
$149/mo
50,000 renders/month
  • ✓ Everything in Free
  • ✓ Higher rate limits
  • ✓ Credit packs stack on top
  • Priority support
  • ✓ Webhook outbound
  • ✓ Team seats + white-label
Get Scale
Pay as you go

No subscription? Prepaid packs from $5.

Valid 12 months · used after plan credits · stack on any plan. Subscriptions stay cheaper per render.

$5
250 renders
$20/1k · one per account
$15
1,000 renders
$15/1k
$39
3,000 renders
$13/1k
Start free →
Quickstart

One curl. Done.

curl -X POST https://api.codetoimage.app/v1/render \
  -H "X-API-Key: $CTI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<h1>Hello, codetoimage</h1>",
    "css": "h1 { color: #6366f1; font: 700 64px/1 sans-serif; padding: 80px }",
    "width": 1200,
    "height": 630,
    "format": "png"
  }' \
  -o output.png

Need a hosted image URL?

Add "output": "url" and get a temporary public link instead of binary – for tools that fetch by URL, like the Instagram Graph API, Slack unfurls, or OpenGraph images.

curl -X POST https://api.codetoimage.app/v1/render \
  -H "X-API-Key: $CTI_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "html": "<h1>Hello</h1>", "output": "url" }'

# → {
#     "url": "https://img.codetoimage.app/r/9f3c…b1.png",
#     "expires_at": "2026-05-28T12:00:00.000Z",
#     "format": "png",
#     "credits_remaining": 9876
#   }

Prefer your terminal?

The official CLI wraps the API with a one-liner install. Render local HTML files, pipe stdin, or get hosted URLs from any shell.

# install
npm i -g @codetoimage/cli

# authenticate (paste an API key from /dashboard/keys)
cti login

# render an HTML file → PNG
cti render hello.html -o hello.png

# inline HTML → JPEG at 1200×630
cti render --html '<h1>Hi</h1>' -f jpeg -w 1200 -h 630 -o og.jpg

# return a hosted URL instead of bytes
cti render hello.html --url
Listed in the official MCP Registry

Plug into Claude, Cursor, or any MCP client.

The official MCP server gives your AI agent two tools – render_html_to_image (inline image) and render_html_to_url (24h hosted URL). No install – your client runs it via npx.

// claude_desktop_config.json
{
  "mcpServers": {
    "codetoimage": {
      "command": "npx",
      "args": ["-y", "@codetoimage/mcp-server"],
      "env": { "CODETOIMAGE_API_KEY": "cti_live_..." }
    }
  }
}