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, paid from $7/mo.
Three interfaces, one engine. Drop into curl, Node, Python, n8n, Cursor, Claude Desktop.
Real headless Chromium with full CSS3 support – web fonts, gradients, animations frozen at any frame.
Always-hot renderer (no cold starts). Median 600ms for typical 1200×630 OG images.
First-class MCP server. Add to Claude Desktop in 60 seconds. Your AI agent renders images autonomously.
Dynamic Open Graph + Twitter card images. Build-time CLI, runtime API, or hosted URL.
Deterministic image rendering for Claude, Cursor, n8n. MCP-native, sub-cent per render.
Carbon.now as an API. Any theme, any frame, batched in CI or from your agents.
One template rendered at the exact size each platform wants – Twitter, LinkedIn, Instagram.
Generate full feed posts and carousel slides from data – quote cards, stat graphics, announcements, batched per campaign.
Hero images with the recipient's name, stats, or certificate. CDN-served URLs per send.
1 render = 1 credit. Test for free with Sandbox (50/mo, watermarked). Upgrade for clean output, larger sizes, all formats. All plans: monthly or yearly (save 17%).
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.pngAdd "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
# }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 --urlThe 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_..." }
}
}
}