RendShot

API Reference

Full API endpoint documentation with error codes and rate limits.

The RendShot REST API. Render HTML to images and capture URL screenshots with a single HTTP call.

Overview

Base URL: https://api.rendshot.ai

All requests are authenticated with a Bearer token in the Authorization header:

curl
curl https://api.rendshot.ai/v1/usage \
  -H "Authorization: Bearer rs_live_YOUR_KEY"

Endpoints

MethodPathDescription
POST/v1/imageRender HTML/CSS or a template to an image
POST/v1/screenshotScreenshot a URL
POST/v1/ai-renderGenerate an image from a natural-language prompt (AI Render guide)
GET/v1/templatesList published templates
POST/v1/templatesCreate a draft template owned by the API key holder
GET/v1/templates/:idGet template details and variables
GET/v1/usageGet current usage and plan limits
GET/v1/image/:idGet image metadata

Interactive Documentation

Explore all endpoints, try requests, and see response schemas in the interactive API reference:

Open API Reference

Authentication

Create an API key in the Dashboard. Keys use the format rs_live_... and are hashed (SHA-256) before storage. Keep your key secret -- it cannot be retrieved after creation.

header
Authorization: Bearer rs_live_YOUR_KEY

Rate Limits & Plans

PlanRate LimitMonthly QuotaRetention
Free10 req/min1007 days
Pro100 req/min10,00030 days

Maximum image dimensions: 4096 x 4096 for all plans.

Error Codes

All errors return a JSON body with { error: { code, message, status } }.

CodeStatusDescription
UNAUTHORIZED401Missing or invalid API key
VALIDATION_ERROR400Request body failed schema validation
INVALID_JSON400Request body is not valid JSON
RATE_LIMIT_EXCEEDED429Too many requests per minute
QUOTA_EXCEEDED429Monthly usage limit reached
NOT_FOUND404Resource not found
IMAGE_EXPIRED410Image has been deleted after retention period
SERVICE_BUSY503Render queue is full, retry later
INVALID_HTML400HTML content could not be parsed
INVALID_OPTIONS400Render options are invalid
PIXEL_BUDGET_EXCEEDED400Requested dimensions exceed pixel budget
SSRF_BLOCKED400URL resolves to a private/internal address
INVALID_URL400URL is malformed or uses a disallowed protocol
RENDER_TIMEOUT408Render did not complete within the timeout
BAD_REQUEST400Generic bad request
PAYLOAD_TOO_LARGE413Request body exceeds size limit
INTERNAL_ERROR500Unexpected server error
AI_TIMEOUT502AI Render generation did not finish within the timeout
AI_NO_TOOL_CALL502AI did not emit a template tool call — usually transient, retry
AI_INVALID_OUTPUT502AI produced malformed HTML or variables
AI_GATEWAY_ERROR500 / 502AI Gateway is unavailable or not configured

AI Render Endpoint

POST /v1/ai-render turns a prompt into an image. Optionally pass template_id to use an existing template as a visual style reference. The response includes the rendered image plus the AI-generated html and variables, which you can persist via POST /v1/templates for reuse.

See the full AI Render guide for modes, examples, and the generate → save → reuse loop.

curl
curl -X POST https://api.rendshot.ai/v1/ai-render \
  -H "Authorization: Bearer rs_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Minimal product card for a premium coffee",
    "platform": "xiaohongshu",
    "locale": "en"
  }'
FieldTypeRequiredDescription
promptstringYesNatural language description, 1--2000 chars
platformstringNoPreset (xiaohongshu, instagram_post, twitter_card, og_image, …) — sets default dimensions
template_idstringNoExisting tpl_... ID to use as a visual style reference
width, heightnumberNoOverride preset dimensions, 1--4096
format'png' | 'jpg'NoOutput format
qualitynumberNoJPEG quality, 1--100
deviceScale1 | 2 | 3NoDevice pixel ratio
fontsstring[]NoGoogle Fonts to load
locale'zh' | 'en'NoLanguage of AI-generated text
timeoutnumberNoAI + render timeout, 1000--55000 ms

The POST /v1/ai-render call counts as one request against your monthly quota — the same as a regular render. No separate AI surcharge.

Create Template Endpoint

POST /v1/templates creates a new template owned by the authenticated API key holder. Templates are always created as private drafts — publish them through the web dashboard if you want them to appear in the public gallery. This endpoint does not consume render quota.

curl
curl -X POST https://api.rendshot.ai/v1/templates \
  -H "Authorization: Bearer rs_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Launch Card",
    "html": "<div class=\"card\"><h1>{{title}}</h1></div>",
    "variables": [
      { "key": "title", "type": "text", "label": "Title", "default": "Hello" }
    ],
    "platform": "twitter_card"
  }'
FieldTypeRequiredDescription
namestringYesTemplate name, 1--100 chars
htmlstringYesHTML body with {{variable}} placeholders, up to 100 KB
variablesarrayYesVariable definitions (max 50)
descriptionstringNoHuman description, up to 5 KB
platformstringNoPlatform preset, defaults to custom
categorystringNoCategory slug
tagsstring[]NoUp to 10 tags
width, heightnumberNoOverride preset dimensions
cssstringNoExtra CSS, up to 100 KB
fontsstring[]NoGoogle Fonts to load
visibility'public' | 'private'NoDefaults to private

Each variable in variables has this shape:

variable.json
{
  "key": "title",
  "type": "text",          // text | image | color | number | select
  "label": "Title",
  "default": "Hello",
  "required": false,
  "maxLength": 100,        // text only
  "min": 0,                // number only
  "max": 1000,             // number only
  "options": ["A", "B"]    // select only
}

Response:

response.json
{
  "id": "tpl_abc123",
  "name": "Launch Card",
  "status": "draft",
  "visibility": "private",
  "platform": "twitter_card",
  "width": 1200,
  "height": 628,
  "createdAt": "2026-04-10T12:00:00Z"
}

Next Steps

On this page