# One screenshot request, mapped stop by stop

> The ten stops between a screenshot call and the image: what each does, how long it takes, and the error it returns. Timed on the real renderer.

System map by Serghei Pogor, founder of CurlShot (https://curlshot.com/about/serghei-pogor). Published 22 November 2026. Page for people: https://curlshot.com/blog/screenshot-request-path-map

A screenshot request to CurlShot passes 10 stops: a key check, an options check and a Redis gate in the web tier; then in a renderer a queue, an address check and browser, the page load, the waits, the capture and the encode; then storage and the answer. A request refused before the browser opens came back in 4 to 15 ms in a lab run, and one that failed at the capture took 5 to 8 s. A failed render is not billed.

## Key facts

- A request passes 10 stops: key, options and gate in the web tier, then queue, address and browser, load, waits, capture and encode in a renderer, then storage and the answer back in the web tier.
- Where a request fails sets what it costs. In the lab a refused private address came back in 4 to 15 ms, a missing wait_for_selector element after the 3 s timeout, and a missing element at capture after 5 to 8 s.
- Most of the time is in the waits, not the capture. A page that never goes quiet took 4.7 s at best at the default and 11.5 s with wait_until=networkidle, against 0.6 s for the cheapest page.
- Four nested limits wrap one render. At the defaults: the page has 30 s, the renderer gives up at 75 s, the web tier waits 110 s on one renderer and holds your slot 130 s.
- A failed render is released, not billed: the unit reserved at the gate goes back. Most failed renders, and any you hang up on, still count toward a per-minute failure budget, so CurlShot pauses new renders for an account that fails too many in one minute.

## The ten stops
One request passes 10 stops. Stops 1 to 3 and 10 run in the web tier; 4 to 9 run in a renderer. A failed render is released, not billed: the unit reserved at stop 3 goes back.

### 1. Key check (web tier)
The access key is read from the access_key query parameter, then the X-Access-Key header, then an Authorization bearer header. The query wins, so a header cannot re-point a signed link.

The key's record is looked up in three places in turn: a short-lived copy in the web process, then Redis, then the database. A signed link has its signature and its expiry checked here too.

On a POST the key is judged before the body is read, so an unknown key never makes the server buffer a large upload.

Time: Not timed. A hit in the process copy or in Redis does no database work.

| Error | Status | What the caller sees |
| --- | --- | --- |
| access_key_required | 401 | No key was sent. The message names access_key and X-Access-Key. |
| access_key_invalid | 401 | The key is not in the right shape, does not exist, or was revoked. |
| signature_required | 403 | The key accepts only signed requests and no signature came with it. |
| signature_invalid | 403 | The signature does not match, or it was made for another endpoint. |
| request_expired | 403 | The expires time of a signed link is in the past. |
| email_not_verified | 403 | The account's email address is not confirmed yet. |
| rate_limited | 429 | One address sent too many keys that do not exist. Retry-After is 60 seconds. |

### 2. Options check (web tier)
A POST body is read with a hard size cap, enforced while it streams in, and must be a JSON object. Query and body options are merged.

Every option is checked against the schema, and every missing one is filled with its default: format png, a 1280 by 1024 viewport, wait_until load, timeout 30 seconds, cache off, cache_ttl 14400 seconds.

Then the plan is checked: the format, PDF, video, async, webhooks and the cache must be in it, html and markdown must fit the size limit, and full-page height is capped to the plan.

Time: Not timed. It is schema work on a few hundred bytes, no network call.

| Error | Status | What the caller sees |
| --- | --- | --- |
| invalid_options | 400 | A list called errors with one field and one message for each wrong option, for example "format: must be one of: png, jpeg, webp, pdf, mp4, webm, gif". |
| invalid_request | 400 | The POST body is not valid JSON or is not an object. |
| content_too_large | 413 | The body, or the html or markdown inside it, is over the size limit. |
| feature_not_available | 403 | The plan does not include what was asked for. An upgrade_url comes with it. |
| method_not_allowed | 405 | Any method except GET, HEAD, POST and OPTIONS, answered before the key is read. An Allow header lists the ones that work. |

### 3. Gate (web tier)
One atomic call to Redis does five jobs in a fixed order: the per-minute rate limit of the account; the cache lookup when cache=true; the account's failure budget; one concurrency slot of the plan; and a reservation of one unit of quota.

A cache hit ends the request here: the stored file is sent, nothing is rendered and nothing is counted. If an identical request is already rendering, this one waits for its result, polling every 150 ms, and holds no slot and no unit meanwhile.

The unit is reserved, not spent. It is committed when the render succeeds and released when it fails. With async=true the request leaves the map here: it is queued and the caller gets a 202 with a job link.

Time: Not timed. One round trip to Redis.

| Error | Status | What the caller sees |
| --- | --- | --- |
| rate_limited | 429 | Over the plan's requests per minute. Retry-After says how long to wait. |
| failure_limit | 429 | Too many of this account's renders failed in the last minute: half the plan's rate limit, at least 5. |
| concurrency_limit | 429 | The plan's renders at once are all in use. Retry-After is 1 second. |
| quota_exceeded | 402 | The billing period's screenshots are used up. An upgrade_url comes with it. |
| service_unavailable | 503 | Redis cannot be reached. The request is refused, never let through. Retry-After is 5 seconds. |

### 4. Renderer queue (renderer)
The web tier picks the least busy renderer: its own in-flight count plus the load the renderer last reported, round robin among equals. A renderer that failed three times in a row is skipped for 10 seconds.

The renderer checks a shared secret, parses the options again, and then takes one of its render slots. By default a renderer runs 4 renders at once and lets 8 more wait, for at most 15 seconds. A full queue answers renderer_busy, and the web tier tries the next renderer.

A per-account cap on the renderer, from the plan's concurrency, stops one account from filling an instance.

Time: Zero when a slot is free. Otherwise the wait for the renders in front, up to the 15 second cap. In the lab, five requests sent at once to a one-slot renderer came back 1.7, 3.0, 4.3, 5.5 and 6.8 seconds later, and a sixth was refused in 34 ms (see the queue table below).

| Error | Status | What the caller sees |
| --- | --- | --- |
| renderer_busy | 503 | Every renderer was full for the whole retry window. Retry-After is 2 seconds. |
| renderer_unavailable | 503 | No renderer could be reached. Retry-After is 5 seconds. |
| concurrency_limit | 429 | This account already has as many renders on that instance as its plan allows. |

### 5. Address check and browser (renderer)
Before a browser is touched, the address is checked: the scheme must be http or https, the port a web port, the host is resolved, and private, loopback, link-local and cloud-metadata addresses are refused. A host that does not resolve fails here too, not at the page load.

Then a new incognito context is opened in the shared Chromium with the request's device, user agent, language, time zone, colour scheme, headers and cookies. All of the browser's traffic leaves through an egress proxy that checks each request and each redirect against the same rules.

A context lives for one render and is always closed, whatever happens.

Time: A refused address came back in 4 to 15 ms and an unknown host in 20 to 37 ms, because both fail here, before a browser is opened. A request that passes has a floor: html in the body, captured at once, took 576 ms at best and 1.1 s in the middle. That covers the context, a trivial capture and the file.

| Error | Status | What the caller sees |
| --- | --- | --- |
| invalid_url | 400 | The address has no host, a bad port or a name that is not valid. |
| host_not_allowed | 403 | "The address 127.0.0.1 is not publicly reachable." Also a port that is not a web port, or a name that resolves to a private address. |
| navigation_failed | 503 | "The host no-such-host.invalid could not be resolved." |
| internal_error | 500 | "The browser could not be started. Please retry." Not billed. |

### 6. Page load (renderer)
The browser goes to the address and waits for the event named in wait_until, default load, for at most timeout seconds (default 30, from 1 to 90). Redirects are followed through the proxy.

If the answer is a PDF file, the render stops: the browser would show its own viewer and the capture would be an empty frame. If the page is a bot check, it gets up to 6 seconds to solve itself and navigate away (25 seconds for a few known self-solving checks).

A page with an HTTP error status and real content is still captured: in the lab a page that answered 404 with a line of text came back as a normal 200 image. Only an error status with an empty body fails.

Time: The page's own load time, plus the browser's. In the lab a document held back for 1.5 s was captured in 2.1 s at best, with wait_until=domcontentloaded.

| Error | Status | What the caller sees |
| --- | --- | --- |
| navigation_failed | 503 | The message says why in plain words: host not found, connection refused or closed, invalid certificate, redirect loop, an error status with an empty page, or a PDF. |
| timeout | 503 | The page was not ready within timeout. Try a larger timeout or a lighter wait_until. |
| host_not_allowed | 403 | A redirect led to an address that is not allowed. |
| page_blocked | 422 | The site answered with a bot check or a block page. Not billed. |

### 7. Waits (renderer)
With wait_until load or networkidle the renderer does not capture at the load event. It waits for the network to go quiet, at most 3 seconds (10 with networkidle), then compares small greyscale frames of the viewport every 250 ms until two comparisons in a row show no change, at most 3 seconds. Nothing in this step can fail a render. With domcontentloaded or commit, and for html or markdown input, the step is skipped.

Then, only if asked: hide cookie banners, wait for wait_for_selector to be visible, wait delay seconds (0 to 30), apply styles, hidden selectors, scripts and one click.

Last, a page that drew nothing is refused instead of captured, unless the request changed the page itself.

Time: Where most of the time goes. A page that fills in after a 0.8 s fetch took 0.6 s at best with wait_until=domcontentloaded and 2.7 s at the default, and the two files differed. A page that never goes quiet took 4.7 s at best at the default and 11.5 s with networkidle. delay=1 on a plain page took 2.6 s at best, against 1.8 s without it.

| Error | Status | What the caller sees |
| --- | --- | --- |
| selector_not_found | 422 | No visible element matched wait_for_selector before the timeout. |
| invalid_options | 400 | wait_for_selector or click is not a valid CSS selector. |
| page_blocked | 422 | A bot check appeared late, or the page is blank. Not billed. |
| timeout | 503 | The page kept its main thread busy and never became ready to capture. |

### 8. Scroll and capture (renderer)
For a full-page capture, or a PDF, with full_page_scroll on (the default), the page is scrolled down in steps of 90 percent of the window height with a 90 ms pause, for at most 12 seconds. Lazy images are switched to eager, up to 4 more seconds are given to images still loading, and the page returns to the top.

The browser then takes the shot: the viewport, the whole page up to full_page_max_height (default 20000 px, at most 30000), one element, or a clip. Size is also capped at 64 million device pixels. A PDF is printed instead.

Time: On an 8000 px page the viewport alone took 1.5 s at best, the whole page with the scroll off 2.4 s, and with the scroll on (the default) 6.0 s. The pauses in the scroll code add up to under 1 s for that page; the rest of the gap is scrolling work on a busy host. A PDF of the same page took 2.2 s.

| Error | Status | What the caller sees |
| --- | --- | --- |
| selector_not_found | 422 | The selector of an element capture matches nothing, or the element has no size. |
| content_too_large | 413 | The element is over the pixel cap. |
| internal_error | 500 | The page crashed or the browser stopped. Not billed. Retry. |
| timeout | 503 | The hard deadline of the render passed: timeout plus delay plus 45 seconds. |

### 9. Encode (renderer)
PNG, and JPEG without a resize, come straight out of Chromium. WebP, or any request with image_width or image_height, goes through a second step with sharp: resize (fit cover, anchored to the top), then PNG, mozjpeg JPEG on a white background, or WebP at image_quality.

The width and height are read from the finished file. The size is checked against the output cap, 25 MB by default.

Time: None for a PNG, or a JPEG, without a resize: the browser writes the file. With sharp, on an 8300 px capture, WebP took about 1.2 s of CPU and a mozjpeg JPEG about 1.2 s, and a PNG about 0.1 s (table below).

| Error | Status | What the caller sees |
| --- | --- | --- |
| content_too_large | 413 | The file is over the cap, or a WebP would be over 16383 px on a side. The message suggests jpeg or webp, a lower image_quality, or a smaller full_page_max_height. |

### 10. Store and answer (web tier)
The renderer sends the bytes back with the size and render time in headers. The web tier writes the file to storage (kept 24 hours by default, or cache_ttl when cache=true), commits the reserved unit, frees the slot and the lock, and writes the history row off the request path.

With cache=true, a pointer to the file goes into Redis, so the next identical request is a hit at stop 3. The answer carries X-Cache (MISS or HIT), X-Render-Ms, X-Image-Width, X-Image-Height, X-Reference-Id and the quota and rate headers. With response_type=json the body is a description and a link instead of the file.

If the caller hung up, nothing is billed and the render is logged as cancelled.

Time: The storage write was not timed. It depends on the driver, local disk or an S3-compatible bucket.

| Error | Status | What the caller sees |
| --- | --- | --- |
| internal_error | 500 | Only with response_type=json: the file could not be stored, so there is nothing to link to. Not billed. |
| request_cancelled | 499 | The client closed the connection first. Not billed, and nobody is left to read the answer. |
## Where the time goes
Stops 4 to 9, timed with the real renderer on 12 November 2026. Fastest is the quickest run, middle is the median, slowest is the longest.
| Request | Stop | Fastest | Middle | Slowest |
| --- | --- | --- | --- | --- |
| html in the request, captured at once (wait_until=commit) | 5, the floor | 576 ms | 1.1 s | 2.6 s |
| A plain page by address, wait_until=domcontentloaded | 6, page load | 1.1 s | 1.8 s | 49.1 s |
| The same page at the default, wait_until=load | 7, waits | 1.8 s | 2.2 s | 14.0 s |
| A document held back 1.5 s, wait_until=domcontentloaded | 6, page load | 2.1 s | 2.6 s | 3.0 s |
| An app that fills in after an 0.8 s fetch, domcontentloaded | 7, waits | 616 ms | 737 ms | 2.3 s |
| The same app at the default, wait_until=load | 7, waits | 2.7 s | 3.1 s | 3.2 s |
| A page that polls its server forever, at the default | 7, waits | 4.7 s | 5.9 s | 9.4 s |
| The same page with wait_until=networkidle | 7, waits | 11.5 s | 12.0 s | 16.7 s |
| A plain page with delay=1 | 7, waits | 2.6 s | 3.0 s | 3.9 s |
| An 8000 px page, viewport only | 8, capture | 1.5 s | 2.2 s | 3.4 s |
| The same page, full_page, full_page_scroll off | 8, capture | 2.4 s | 4.7 s | 10.7 s |
| The same page, full_page, scroll on (the default) | 8, capture | 6.0 s | 7.6 s | 15.5 s |
| The same page as a PDF | 8, capture | 2.2 s | 2.3 s | 11.3 s |
- A plain page by address, wait_until=domcontentloaded: The 49 s run came while the host's load average was about 30. The middle figure is the better guide.
- The same page at the default, wait_until=load: Six of seven runs were counted. The seventh was answered 503 timeout after 52 s: the host's load average was about 30 at that moment, and the render ran into its own limit.
- An app that fills in after an 0.8 s fetch, domcontentloaded: The file was 7,174 bytes. The page starts its fetch at the load event, so this capture was taken before it and shows the word "loading" (pictures below).
- The same app at the default, wait_until=load: The file was 9,672 bytes: the waits let the fetch finish and the content draw. That is what the extra two seconds buy.
- A page that polls its server forever, at the default: The network never goes quiet, so the waits run to their caps: 3 s for the network, then the picture check.
- The same page with wait_until=networkidle: The network cap is 10 s with networkidle. A page that never goes quiet pays all of it.
## What a failure costs
| Failure | Stop | Error | Time to the answer |
| --- | --- | --- | --- |
| A loopback or cloud-metadata address | 5 | host_not_allowed | 4 ms to 15 ms |
| An option the renderer's own check refuses | 5 | invalid_options | 9 ms to 22 ms |
| A host name that does not exist | 5 | navigation_failed | 20 ms to 37 ms |
| A page slower than timeout=1 | 6 | timeout | 1.0 s to 1.2 s |
| A page that draws nothing | 7 | page_blocked | 1.8 s to 2.2 s |
| wait_for_selector with invalid CSS | 7 | invalid_options | 1.5 s to 2.2 s |
| wait_for_selector for an absent element, timeout=3 | 7 | selector_not_found | 3.1 s to 3.1 s |
| A capture over the output cap (a 2 KB cap here) | 9 | content_too_large | 980 ms to 3.0 s |
| selector for an element that is absent at capture | 8 | selector_not_found | 5.0 s to 8.1 s |
A request refused before the browser opens costs milliseconds. One that fails after the page loaded and the waits ran costs about a full render.
## The encode step alone
A PNG, and a JPEG without a resize, are written by the browser and cost this stop nothing. WebP, or any request with image_width or image_height, goes through sharp. This table times that step alone on one real 1280 by 8319 px capture, from the PNG the browser produced, and reads the process's CPU time as well, because wall time on a busy host moves around.
| Format | File size | Wall time, middle | CPU time, middle |
| --- | --- | --- | --- |
| PNG again (a resize without a format change) | 422,169 bytes | 121 ms | 126 ms |
| JPEG, quality 80, mozjpeg | 292,162 bytes | 1.1 s | 1.2 s |
| WebP, quality 80 | 234,194 bytes | 1.2 s | 1.2 s |
## Clocks inside clocks
| Limit | Enforced by | Rule | Defaults | timeout=90, delay=30 |
| --- | --- | --- | --- | --- |
| The page must be ready | The renderer | timeout plus delay | 30 s | 120 s |
| The render's hard deadline | The renderer | timeout plus delay plus 45 s for scroll, capture and encode | 75 s | 165 s |
| The wait for one renderer | The web tier's renderer client | timeout plus delay plus 80 s: two queue waits of 15 s, the 45 s capture budget, 5 s to send the file back | 110 s | 200 s |
| The hold on slot, unit and lock | The web tier | the line above plus 20 s for going round busy renderers | 130 s | 220 s |
Set the timeout of your own HTTP client above the hard deadline of the render, or it will hang up on a render that is still working.
## A full queue
A renderer runs a limited number of renders at once and lets a few more wait. In this lab the renderer was set to one slot with room for four waiting requests and the default 15 second wait, and six identical requests were sent at the same moment.
| Request | Answer | Waited and rendered |
| --- | --- | --- |
| First | 200 image | answered after 1.7 s (rendered in 1.7 s) |
| Second | 200 image | answered after 3.0 s (rendered in 1.3 s) |
| Third | 200 image | answered after 4.3 s (rendered in 1.3 s) |
| Fourth | 200 image | answered after 5.5 s (rendered in 1.2 s) |
| Fifth | 200 image | answered after 6.8 s (rendered in 1.3 s) |
| Sixth | 503 renderer_busy | refused after 34 ms: one running and four waiting is the limit |
Each request waited for the renders in front of it, and the caller sees that as a slower answer, not as an error. The sixth was turned away at once, which is the signal that sends the web tier on to the next renderer. In a second run with the wait cap at 1.5 s, two requests that were still waiting gave up with renderer_busy after 1.55 and 1.59 s. The per-account cap works the same way: with a plan concurrency of 1, a second request of the same account was refused with concurrency_limit in 196 ms while its first was rendering.
## What the map leaves out
- Async and bulk: with async=true, or a bulk call, the line ends at stop 3. The request is queued and the caller gets a 202 with a job link; a worker in a renderer runs stops 5 to 10 later and may call a webhook.
- Video: a video waits for a video slot before a render slot, and has its own longer budget.
- HEAD: a HEAD request never renders and never counts. It answers from the cache when a stored result exists and with a 405 otherwise.
- Running it yourself: a Puppeteer or Playwright script has stops 5 to 9 and none of the others. See https://curlshot.com/tools/puppeteer-screenshot-api and https://curlshot.com/tools/screenshot-api. Plans are on https://curlshot.com/pricing.
## How it was measured
On 12 November 2026, with Chromium 153.0.8010.12 through Playwright 1.63.0 and sharp 0.35.5. The real renderer process was started through its engine-test harness (one renderer, one Chromium, four render slots) and sent POST /render requests, the same call the web tier makes. A local server on the lab host answered the test pages with set delays. Each timing row is 5 or 7 timed requests after one warm-up request that is not counted. The host was shared with other jobs and was busy during the run (load average between 10 and 30 on 6 cores), so the typical figure is the middle run and the fast figure is the quickest run, which is the closest to an idle machine. The map, the order of the checks, the limits and every error message were read from the source of the web tier and the renderer on the same day. Stops 1 to 3 and the storage write in stop 10 were not timed: they need Redis and a database. No call was sent to the public API in this run. Limits are the defaults in the code; a deployment can change the renderer ones with settings, and the plan decides the rest.

## Questions

### What happens between a screenshot request and the image?

Ten stops, read from the CurlShot source on 12 November 2026. The web tier checks the key and the options, then one Redis call applies the rate limit, looks for a cached copy, takes a slot and reserves a unit of quota. A renderer queues the request, checks the address, opens a browser context, loads the page, waits for it to settle, captures and encodes. The web tier stores the file, commits the unit and answers.

### Why does a screenshot request take several seconds?

Mostly the waits after the page loads. With the default wait_until=load the renderer waits up to 3 s for the network to go quiet and up to 3 s for the picture to stop changing. In the lab a plain page took 1.8 s at best at the default, a page that fills in late 2.7 s, and a page that never goes quiet 4.7 s, or 11.5 s with networkidle.

### Does a failed screenshot request count against my quota?

No. The gate reserves one unit before rendering, and a failed render releases it; only a success commits it. A cache hit is not counted either. Most failed renders do count toward a per-minute failure budget, by default half your plan's rate limit and at least 5, and so does one you hang up on.

### What timeout should my HTTP client use for a screenshot API call?

Longer than the render's own hard deadline: timeout plus delay plus 45 s, which is 75 s at the defaults and 165 s at timeout=90 with delay=30. A client that hangs up earlier cancels a render that was still working. For slow pages use async=true and fetch the result from the job link instead.

### Is a 404 page captured as a screenshot?

Yes, when it has content. In the lab a page that answered 404 with a line of text came back as a normal 200 image. Only an error status with an empty page fails, with navigation_failed. Check the status of your own target if a 404 matters to you.

### Which screenshot API errors are worth retrying?

The ones that come from capacity or a passing fault: renderer_busy, renderer_unavailable, service_unavailable, internal_error, and with care timeout and navigation_failed. Wait for Retry-After when it is set. A 429 is worth retrying after its Retry-After wait. Do not retry a 400, 401, 402, 403, 413 or 422 unchanged: the request, the key, the plan or the page has to change first.

## Sources

1. Playwright documentation, "Playwright: Page.goto, the waitUntil values": https://playwright.dev/docs/api/class-page (checked 12 November 2026)

## Go deeper

- [Screenshot API](https://curlshot.com/tools/screenshot-api)
- [Puppeteer screenshot API](https://curlshot.com/tools/puppeteer-screenshot-api)
- [Error reference](https://curlshot.com/docs/errors)
- [Waiting and timing](https://curlshot.com/docs/waiting)
- [Pricing](https://curlshot.com/pricing)

## Read next

- [15 curl errors on a screenshot call, with fixes](https://curlshot.com/blog/curl-errors-screenshot-api.md): 15 curl errors from real runs of a screenshot call: the exact message, what it means, how to check it and the fix. Paste yours to look it up.
- [Screenshot API vs headless browser: the real cost](https://curlshot.com/blog/screenshot-api-vs-headless-browser.md): A cost calculator with every assumption editable, the hidden work behind headless Chrome, and an honest checklist for build or buy.
- [Lazy images and full-page captures, measured](https://curlshot.com/blog/lazy-images-full-page-scroll-test.md): Five ways a page loads pictures on scroll, seven scroll rules, 105 runs in Chromium: which full-page captures come back with every picture.
