# HopShot
> HopShot turns static HTML into PNG, JPG, or WebP images through a REST API or Model Context Protocol (MCP). Use it for social graphics, quote cards, banners, and other generated images.
Static HTML, inline-image rendering, and public template discovery need no account or API key. Private templates and temporary uploaded assets require authentication. Template authoring is restricted to administrators.
HopShot is not a browser: it renders supported static markup and CSS, not web pages or JavaScript applications. Read the documentation for current limits and supported features.
## Documentation
- [API quick start](https://hopshot.dev/docs#api-heading): Render request fields, a curl example, and response handling.
- [Variables and defaults](https://hopshot.dev/docs#variables-heading): Bind text, attributes, and whole CSS values with [[ name ]] and [[ name | Default value ]] placeholders.
- [Templates](https://hopshot.dev/docs#templates-heading): Discover saved designs, fetch versions, and render with variable overrides.
- [Output formats](https://hopshot.dev/docs#formats-heading): PNG, JPG, and WebP options and MIME types.
- [MCP connection guide](https://hopshot.dev/docs#mcp-heading): Connect Claude Desktop, ChatGPT, and other Streamable HTTP clients.
- [Image uploads](https://hopshot.dev/docs#uploads-heading): Authenticated, private temporary uploads and asset references.
- [Supported markup and limits](https://hopshot.dev/docs#limits-heading): CSS, fonts, dimensions, payload sizes, and rate limits.
- [Inline images](https://hopshot.dev/docs#inline-images-heading): Embed static PNG, JPEG, or WebP images as base64 data URLs.
- [Errors and retries](https://hopshot.dev/docs#errors-heading): HTTP errors, MCP tool errors, and retry guidance.
- [Template directory](https://hopshot.dev/templates): Browse public templates with previews, dimensions, and copyable requests.
## Rendering essentials
Send JSON to POST https://hopshot.dev/api/v1/render with exactly one of `html` or `template`. Raw HTML accepts optional `width` and `height` in pixels. Saved templates use their saved dimensions. Set `format` to `png` (default), `jpg`, `jpeg`, or `webp`.
The REST response contains raw image bytes, not JSON, base64, or an image URL. Save the bytes using the matching file extension. Ordinary renders are returned directly rather than hosted.
Use static HTML with inline CSS, plain style rules, or supported Tailwind classes. Scripts, event handlers, remote image URLs, SVG, arbitrary external assets, and CSS URLs are unsupported. Google Fonts are loaded through the controlled font loader when requested by font-family; do not add external stylesheet links or font URLs.
For raw HTML, send `variables: {}` to activate inline placeholder defaults; omitting `variables` preserves the HTML literally. Saved templates bind automatically. Image placeholders must occupy the entire img src value. Have client code read and base64-encode real image files; do not invent base64 image data.
## MCP
Connect to https://hopshot.dev/mcp using Streamable HTTP. Call `render_image` with the same rendering fields as the REST API. Successful MCP renders return image content with base64 bytes and a MIME type, not a hosted image URL. Check `result.isError` before reading the image.
Claude Desktop and ChatGPT can connect using OAuth with automatic client registration. Other clients may use an account API key as an Authorization Bearer header. Once authenticated, call `get_rendering_guide` with no arguments for current capabilities, limits, fonts, examples, and retry guidance.
REST protected operations accept an account API key; OAuth connections are accepted only on MCP. Uploaded assets belong to the authenticated account and expire automatically. The upload file transfer uses the returned short-lived upload ticket, not the account key.
Respect Retry-After on HTTP 429 or 503 responses and `error.retry_after` in MCP tool errors when present. Failed and busy render attempts count toward allowances.
## Optional
- [Home](https://hopshot.dev/): Product overview and rendering example.
- [Privacy policy](https://hopshot.dev/privacy): How HopShot handles account information and submitted content.
- [Terms and conditions](https://hopshot.dev/terms): Service terms and acceptable use.
- [Contact](https://hopshot.dev/contact): Questions, feedback, and support.