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.
Rendered by your browser. Hit Render PNG for the real file from the API.
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. 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%).
Valid 12 months · used after plan credits · stack on any plan. Subscriptions stay cheaper per render.
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: #0090ff; 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_..." }
}
}
}