Documentation
The documentation of Snapsbrew, the self-hosted image generation API.
The documentation of Snapsbrew, by section.
Getting started
- Introduction: What Snapsbrew is, what it does, and how the parts fit together.
- Install with Docker: Run Snapsbrew with Docker Compose, create the owner account and open the app.
- Install without Docker: Install Snapsbrew on a server with PHP, Node, MySQL, Redis and a renderer.
- Your first snap: Copy a starter template, render it in the browser, then render it from the REST API.
- Upgrading: Update a Snapsbrew instance to a new version, with Docker or without Docker.
Using Snapsbrew
- Templates: Create, resize, tag, publish and revert the templates that every snap renders from.
- The editor: Add, arrange, group and save the layers of a template in the browser editor.
- Layers and variants: The layer object, its properties, and the variants that change a layer for one snap.
- Snaps: Render a snap from a template, in sync or async mode, as an image or a PDF.
- Batches and imports: Render many snaps from one template with an API batch or a spreadsheet import.
- Creative packages: Export up to 10 final images from published template versions into one package through the MCP server.
- Signed URLs: Put a signed image URL in an img tag or an og:image tag, and Snapsbrew renders the snap on the first request.
- Embedded forms: Share or embed a signed form that renders a template from the values that a person types.
- Collections and forms: Group templates in a collection, and create forms for one template or for a whole collection.
- Screenshots: Capture a public web page as a PNG image from the web app or the API.
- Fonts and media: Upload custom fonts for your company and images for your media library.
Self-hosting
- Configuration: Every environment variable of Snapsbrew, in groups, with its default value.
- Reverse proxy and TLS: Serve Snapsbrew over HTTPS behind Caddy, NGINX or Traefik.
- Storage: Choose where Snapsbrew stores the rendered images and the uploads, on the local disk or in an S3-compatible bucket.
- Rendering: Choose and tune the renderer, Browserless or Browsershot, and make sure that it can load fonts and images.
- Queues and Horizon: How Snapsbrew uses queues, how Horizon runs them, and who can open the Horizon dashboard.
- Scheduler: The commands that Snapsbrew runs on a timer, and how to run the Laravel scheduler.
- Backups: What to back up on a Snapsbrew instance, and how to back up and restore a Docker install.
- Accounts and registration: Create the owner, choose who can sign up, invite people and deactivate users.
- Recover access: Reset a password or turn off two-factor authentication from the command line, without email.
- Troubleshooting: Find and correct the common problems of a self-hosted Snapsbrew instance.
API
- API overview: The base URL, authentication, response shapes, rate limits, errors, idempotency and webhooks of the Snapsbrew REST API.
- Authentication: Read the account and the company of the current API token.
- Guides: Read the static catalogs for layers, variants, design rules, platforms, image purposes and the editor document contract.
- Templates: List, read, create, update, publish and delete templates through the REST API.
- Editor documents: Read, change, replace and inspect the v2 editor document of a template with compare-and-swap writes.
- Media: Upload images to your media library and list them, so that image layers can use them.
- Screenshots: Capture a web page as an image and read the screenshots of your company.
- Snaps: Render a template or a collection into an image or a PDF, in sync or async mode, with variants and idempotency keys.
- Snap batches: Render up to 100 snaps from one template in the background, read the progress and cancel a batch.
- Preview: Render a template or a planned snap as watermarked HTML, with no stored snap.
- Tags: Create and search the tags of your company, and set the tags of a template.
- Embedded forms: Submit layer values to a signed form URL and get a rendered snap, with no API token.
- Free tools: The four public tool endpoints that a marketing site can call without a token, and how to turn them on.
- OpenAPI and Postman: Where an instance serves its API reference, the OpenAPI file, the Postman collection and the Markdown exports.
MCP
- MCP server: How an AI agent connects to Snapsbrew over the Model Context Protocol, and the workflow and error format of the server.
- Connect Claude: Connect Claude Code, Claude Desktop or the Claude connector to the MCP server of a Snapsbrew instance.
- Connect Cursor and other clients: Connect Cursor, Codex CLI and other MCP clients to a Snapsbrew instance with an API token or with OAuth.
- MCP tools reference: The name, the description and the arguments of each tool of the Snapsbrew MCP server.
- OAuth for the MCP server: The OAuth 2.0 flow, the endpoints, the token lifetimes and the settings that let a connector use the MCP server without an API token.