---
title: "Render a URL or HTML to PDF (query parameters; embeddable in <img src> with api_key)"
method: GET
path: "/v1/pdf"
---

# Render a URL or HTML to PDF (query parameters; embeddable in <img src> with api_key)

`GET /v1/pdf`

## Request

- Base URL: `https://shotkiln.com`
- URL: `https://shotkiln.com/v1/pdf`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
  - none

## Query parameters

- `url` string, uri
- `html` string: Raw HTML; use instead of url
- `format` 'A3' | 'A4' | 'A5' | 'Letter' | 'Legal' | 'Tabloid'
- `landscape` boolean
- `print_background` boolean
- `margin` string: All sides; or margin_top/right/bottom/left
- `margin_top` string
- `margin_right` string
- `margin_bottom` string
- `margin_left` string
- `delay` integer
- `cache_ttl` integer

## Response `200`

Rendered file

## Other responses

- `400`: Invalid parameter or blocked URL (code: invalid_parameter, invalid_url, url_blocked, blocked_url)
- `401`: Invalid or revoked API key
- `413`: Target page too large
- `429`: Rate limit, daily limit or monthly quota exceeded (see Retry-After)
- `502`: Target page failed to load
- `503`: Browser capacity temporarily unavailable (see Retry-After)
- `504`: Render timed out

---

[API](https://skmtc.dev/shotkiln/apis/shotkiln-api.md) · [All operations](https://skmtc.dev/shotkiln/apis/shotkiln-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shotkiln/apis/shotkiln-api/revisions/8123a05b6719?raw)
