diff --git a/src/content/docs/browser-rendering/platform/browser-close-reasons.mdx b/src/content/docs/browser-rendering/platform/browser-close-reasons.mdx index 8677d0bf70695a..2960697e83003e 100644 --- a/src/content/docs/browser-rendering/platform/browser-close-reasons.mdx +++ b/src/content/docs/browser-rendering/platform/browser-close-reasons.mdx @@ -5,10 +5,19 @@ sidebar: order: 30 --- +import { DashButton } from "~/components"; A browser session may close for a variety of reasons, occasionally due to connection errors or errors in the headless browser instance. As a best practice, wrap `puppeteer.connect` or `puppeteer.launch` in a [`try/catch`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) statement. -The reason that a browser closed can be found on the Browser Rendering Dashboard in the [logs tab](https://dash.cloudflare.com/?to=/:account/workers/browser-renderingl/logs). When Cloudflare begins charging for the Browser Rendering API, we will not charge when errors are due to underlying Browser Rendering infrastructure. +To find the reason that a browser closed: + +1. In the Cloudflare dashboard, go to the **Browser Rendering** page. + + + +2. Select the **Logs** tab. + +When Cloudflare begins charging for the Browser Rendering API, we will not charge when errors are due to underlying Browser Rendering infrastructure. | Reasons a session may end | | ---------------------------------------------------- | diff --git a/src/content/docs/browser-rendering/platform/pricing.mdx b/src/content/docs/browser-rendering/platform/pricing.mdx index be0e44665b9071..b87b710bdc75ba 100644 --- a/src/content/docs/browser-rendering/platform/pricing.mdx +++ b/src/content/docs/browser-rendering/platform/pricing.mdx @@ -4,7 +4,7 @@ title: Pricing sidebar: order: 31 --- -import { Details } from "~/components" +import { DashButton } from "~/components" There are two ways to use Browser Rendering. Depending on the method you use, here is how billing works: - [**REST API**](/browser-rendering/rest-api/): Charged for **Duration** only ($/browser hour) @@ -15,14 +15,6 @@ There are two ways to use Browser Rendering. Depending on the method you use, he | **Workers Free** | 10 minutes per day | 3 concurrent browsers | N/A | | **Workers Paid** | 10 hours per month | 10 concurrent browsers (averaged monthly) | **1. REST API**: $0.09 per additional browser hour
**2. Workers Bindings**: $0.09 per additional browser hour
$2.00 per additional concurrent browser | -
-You can monitor your Browser Rendering usage in the [Cloudflare dashboard](https://dash.cloudflare.com). Go to **Compute (Workers)** > **Browser Rendering**. -
- -
-Cloudflare calculates concurrent browsers as the **monthly average of your daily peak usage**. In other words, we record **the peak number of concurrent browsers each day** and then average those values over the month. This approach reflects your typical traffic and ensures you are not disproportionately charged for brief spikes in browser concurrency. -
- ## Examples of Workers Paid pricing
#### Example: REST API pricing @@ -52,7 +44,14 @@ For **browser duration** and **concurrent browsers**: ### How do I estimate my Browser Rendering costs? -You can monitor your Browser Rendering usage in the [Cloudflare dashboard](https://dash.cloudflare.com). Go to **Compute (Workers)** > **Browser Rendering**. Then, you can use [the pricing page](/browser-rendering/platform/pricing/) to estimate your costs. +To monitor your Browser Rendering usage in the Cloudflare dashboard, go to the **Browser Rendering** page. + + + +Then, you can use [the pricing page](/browser-rendering/platform/pricing/) to estimate your costs. ### Do failed API calls, such as those that time out, add to billable browser hours? No. If a request to the Browser Rendering REST API fails with a `waitForTimeout` error, the browser session is not charged. + +### How is the number of concurrent browsers calculated? +Cloudflare calculates concurrent browsers as the **monthly average of your daily peak usage**. In other words, we record **the peak number of concurrent browsers each day** and then average those values over the month. This approach reflects your typical traffic and ensures you are not disproportionately charged for brief spikes in browser concurrency. \ No newline at end of file diff --git a/src/content/docs/browser-rendering/rest-api/index.mdx b/src/content/docs/browser-rendering/rest-api/index.mdx index 75b52573e51988..936520ff9a3b2e 100644 --- a/src/content/docs/browser-rendering/rest-api/index.mdx +++ b/src/content/docs/browser-rendering/rest-api/index.mdx @@ -4,6 +4,7 @@ title: REST API sidebar: order: 2 --- +import { DashButton } from "~/components"; The REST API is a RESTful interface that provides endpoints for common browser actions such as capturing screenshots, extracting HTML content, generating PDFs, and more. The following are the available options: @@ -22,8 +23,9 @@ Before you begin, make sure you [create a custom API Token](/fundamentals/api/ge :::note[Note] -You can monitor Browser Rendering usage in two ways: -- [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers/browser-rendering): View aggregate metrics, including total REST API requests and total browser hours used. -- `X-Browser-Ms-Used` header: Returned in every REST API response, reporting browser time used for that request (in milliseconds). +You can monitor Browser Rendering usage in two ways: +- In the Cloudflare dashboard, go to the **Browser Rendering** page to view aggregate metrics, including total REST API requests and total browser hours used. + +- `X-Browser-Ms-Used` header: Returned in every REST API response, reporting browser time used for that request (in milliseconds). :::