API reference

One endpoint, one method. Authenticate with the key from your dashboard and send a JSON body. Responses are JSON with a fixed shape, so you can type them once.

Endpoint

endpoint
POST https://api.mysaas.com/v1/capture
Content-Type: application/json
x-api-key: sk_live_demo123456

Request body

FieldTypeDefaultNotes
urlstringrequiredAbsolute URL of the page to render. HTTP and HTTPS only.
formatstringpngImage encoding of the screenshot: png, jpeg or webp.
widthinteger1280Viewport width in pixels, between 320 and 1920.
heightinteger720Viewport height in pixels, between 240 and 1920.
fullPagebooleanfalseCapture the entire scrollable page instead of the viewport.

Example

curl
curl -X POST https://api.mysaas.com/v1/capture \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_live_demo123456" \
  -d '{
    "url": "https://stripe.com",
    "format": "png",
    "width": 1280,
    "height": 720,
    "fullPage": false
  }'
response
{
  "status": "success",
  "execution_time_ms": 342,
  "data": {
    "screenshot_url": "https://cdn.mysaas.com/shots/stripe_1280x720.png",
    "metadata": {
      "title": "Stripe | Financial Infrastructure for the Internet",
      "description": "Stripe is a suite of APIs powering online payment processing and commerce solutions for internet businesses of all sizes.",
      "canonical_url": "https://stripe.com/",
      "og_image": "https://images.stripe.com/v3/open-graph.png",
      "status_code": 200
    }
  },
  "credits_remaining": 99
}

Response fields

status
success when the page rendered, error when it did not.
execution_time_ms
Total render and extraction time on our side.
data.screenshot_url
CDN URL of the stored image. Available for 30 days.
data.metadata.title
og:title when present, otherwise the document title.
data.metadata.description
Meta description, falling back to og:description.
data.metadata.canonical_url
Canonical link, falling back to the final URL after redirects.
data.metadata.og_image
og:image, falling back to twitter:image.
data.metadata.status_code
HTTP status returned by the target page.
credits_remaining
Requests left in the current billing period.

Errors

401
Missing or revoked x-api-key header.
402
Monthly request quota reached. Upgrade the plan or wait for the period to reset.
422
Invalid body: malformed URL, or width and height outside the allowed range.
504
The target page did not respond within the eight second render budget.