Case study · codetoimage

An image API for AI agents, built by AI agents.

codetoimage turns HTML and CSS into pixel-perfect PNG, JPG, or WebP through a REST API, an npm CLI, and an MCP server listed in Anthropic's MCP Registry. This is the story of how it went from idea to a live, paid product in about six weeks – a solo founder as architect and reviewer, AI coding agents writing most of the code.

The problem

AI agents can write flawless HTML and CSS, but they can't turn it into an image a human can post, send, or print. Every workflow that needs a social card, an OG image, or a report page as an actual file hits the same wall.

The existing HTML-to-image services predate the agent ecosystem: no MCP server, CLIs as an afterthought, and the strongest players lock rendering behind template editors. The gap wasn't a missing feature – it was a missing audience.

One engine, three surfaces

1. REST API

For backends and workflows

POST /v1/render with HTML, CSS, size, and format. Streams the image back, or returns a 24h CDN-hosted URL with output: "url".

2. CLI

For scripts and CI pipelines

@codetoimage/cli on npm. Render files or inline HTML from GitHub Actions, cron jobs, or a shell one-liner.

3. MCP server

For Claude, Cursor, and any MCP client

@codetoimage/mcp-server, listed in Anthropic's MCP Registry. Two tools – image inline or hosted URL – so agents render images as a regular tool call, no glue code.

Timeline

First commit

April 2026

Scope cut to the bone: pixel-perfect rendering, agent-first surfaces, nothing else. No templates editor, no screenshot-of-URL sprawl.

Live, with billing

May 2026

Public launch with Stripe subscriptions and a free tier of 50 renders/month – no watermark, full features.

CLI + MCP server on npm

May 2026

@codetoimage/cli and @codetoimage/mcp-server published, and the MCP server listed in Anthropic's MCP Registry.

Pricing v2

July 2026

Prepaid credit packs from $5 for occasional users, subscriptions from $9/month – every plan cheaper per render than any pack.

How it's built

Next.js 16 and Tailwind CSS 4 for the app, TypeScript end to end, Stripe for billing, Postgres for data, headless Chromium for rendering – fronted by Cloudflare and Vercel. The rendering compute is self-hosted, which keeps infrastructure cheap enough to bootstrap indefinitely – it pays for itself with the first few paying customers – and lets the free tier stay generous without a watermark.

The business layer is deliberately simple: a free tier that's actually usable, subscriptions from $9/month, and prepaid packs for people who render twenty images a quarter and shouldn't need a subscription for that.

Built by agents, for agents

Most of the code was written with AI coding agents, with one founder acting as architect, reviewer, and product owner. That isn't a gimmick – it's the only reason a solo, self-funded project could ship an API, a dashboard, billing, a CLI, an MCP server, and a dozen marketing pages in six weeks.

It also keeps the product honest: the people building codetoimage live inside agent workflows daily, so every rough edge an agent would hit – auth, rate limits, error shapes, output formats – gets felt before it ships.

Fast facts

3

surfaces – API, CLI, MCP – one rendering engine

100%

self-hosted rendering compute – cheap enough to bootstrap indefinitely

50/mo

free renders, no watermark, no credit card

~6 weeks

from first commit to live paid product

See what your agents can do with it.

Free tier – 50 renders/month, no watermark, no credit card. Add the MCP server to Claude or Cursor in under a minute.