@b3os/cli 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/README.md +87 -8
  2. package/assets/b3os-run.py +137 -0
  3. package/assets/skill/b3os/SKILL.md +111 -0
  4. package/dist/commands/_agents.d.ts +14 -0
  5. package/dist/commands/_agents.js +33 -0
  6. package/dist/commands/_agents.js.map +1 -0
  7. package/dist/commands/_common.js +6 -2
  8. package/dist/commands/_common.js.map +1 -1
  9. package/dist/commands/_context.d.ts +49 -0
  10. package/dist/commands/_context.js +260 -0
  11. package/dist/commands/_context.js.map +1 -0
  12. package/dist/commands/_next.d.ts +39 -0
  13. package/dist/commands/_next.js +77 -0
  14. package/dist/commands/_next.js.map +1 -0
  15. package/dist/commands/agent.d.ts +42 -0
  16. package/dist/commands/agent.js +218 -0
  17. package/dist/commands/agent.js.map +1 -0
  18. package/dist/commands/app.d.ts +2 -5
  19. package/dist/commands/app.js +229 -69
  20. package/dist/commands/app.js.map +1 -1
  21. package/dist/commands/auth.d.ts +70 -2
  22. package/dist/commands/auth.js +308 -33
  23. package/dist/commands/auth.js.map +1 -1
  24. package/dist/commands/docs.d.ts +54 -0
  25. package/dist/commands/docs.js +202 -0
  26. package/dist/commands/docs.js.map +1 -0
  27. package/dist/commands/doctor.d.ts +23 -0
  28. package/dist/commands/doctor.js +313 -0
  29. package/dist/commands/doctor.js.map +1 -0
  30. package/dist/commands/init.d.ts +38 -1
  31. package/dist/commands/init.js +259 -60
  32. package/dist/commands/init.js.map +1 -1
  33. package/dist/commands/listen.d.ts +30 -0
  34. package/dist/commands/listen.js +194 -0
  35. package/dist/commands/listen.js.map +1 -0
  36. package/dist/commands/manifest.d.ts +13 -1
  37. package/dist/commands/manifest.js +59 -7
  38. package/dist/commands/manifest.js.map +1 -1
  39. package/dist/commands/mcp.d.ts +25 -2
  40. package/dist/commands/mcp.js +120 -11
  41. package/dist/commands/mcp.js.map +1 -1
  42. package/dist/commands/sandbox.d.ts +35 -6
  43. package/dist/commands/sandbox.js +208 -9
  44. package/dist/commands/sandbox.js.map +1 -1
  45. package/dist/commands/setup.d.ts +39 -0
  46. package/dist/commands/setup.js +203 -0
  47. package/dist/commands/setup.js.map +1 -0
  48. package/dist/commands/tool.d.ts +109 -1
  49. package/dist/commands/tool.js +635 -47
  50. package/dist/commands/tool.js.map +1 -1
  51. package/dist/config.d.ts +30 -6
  52. package/dist/config.js +39 -8
  53. package/dist/config.js.map +1 -1
  54. package/dist/ctx.d.ts +5 -45
  55. package/dist/ctx.js +25 -160
  56. package/dist/ctx.js.map +1 -1
  57. package/dist/docs/index.json +1 -0
  58. package/dist/docs/pages/actions/call.md +300 -0
  59. package/dist/docs/pages/actions/catalog/airtable.md +737 -0
  60. package/dist/docs/pages/actions/catalog/arxiv.md +166 -0
  61. package/dist/docs/pages/actions/catalog/chainalysis-sanctions.md +125 -0
  62. package/dist/docs/pages/actions/catalog/coingecko.md +1558 -0
  63. package/dist/docs/pages/actions/catalog/deps-dev.md +465 -0
  64. package/dist/docs/pages/actions/catalog/dexscreener.md +568 -0
  65. package/dist/docs/pages/actions/catalog/discord.md +784 -0
  66. package/dist/docs/pages/actions/catalog/finnhub.md +776 -0
  67. package/dist/docs/pages/actions/catalog/frankfurter.md +438 -0
  68. package/dist/docs/pages/actions/catalog/github.md +1853 -0
  69. package/dist/docs/pages/actions/catalog/gmail.md +575 -0
  70. package/dist/docs/pages/actions/catalog/google-calendar.md +654 -0
  71. package/dist/docs/pages/actions/catalog/google-drive.md +502 -0
  72. package/dist/docs/pages/actions/catalog/google-sheets.md +700 -0
  73. package/dist/docs/pages/actions/catalog/hacker-news.md +542 -0
  74. package/dist/docs/pages/actions/catalog/http.md +824 -0
  75. package/dist/docs/pages/actions/catalog/hyperliquid.md +942 -0
  76. package/dist/docs/pages/actions/catalog/jira.md +920 -0
  77. package/dist/docs/pages/actions/catalog/kalshi.md +917 -0
  78. package/dist/docs/pages/actions/catalog/linear.md +1030 -0
  79. package/dist/docs/pages/actions/catalog/markets.md +21 -0
  80. package/dist/docs/pages/actions/catalog/morpho.md +247 -0
  81. package/dist/docs/pages/actions/catalog/notion.md +1077 -0
  82. package/dist/docs/pages/actions/catalog/nws.md +485 -0
  83. package/dist/docs/pages/actions/catalog/open-meteo.md +559 -0
  84. package/dist/docs/pages/actions/catalog/polymarket.md +1523 -0
  85. package/dist/docs/pages/actions/catalog/pushbullet.md +220 -0
  86. package/dist/docs/pages/actions/catalog/resend.md +307 -0
  87. package/dist/docs/pages/actions/catalog/s3.md +513 -0
  88. package/dist/docs/pages/actions/catalog/sec-edgar.md +487 -0
  89. package/dist/docs/pages/actions/catalog/slack.md +2629 -0
  90. package/dist/docs/pages/actions/catalog/stripe.md +1405 -0
  91. package/dist/docs/pages/actions/catalog/wikipedia.md +379 -0
  92. package/dist/docs/pages/actions/catalog.md +46 -0
  93. package/dist/docs/pages/actions/limits.md +50 -0
  94. package/dist/docs/pages/actions/model-tools.md +225 -0
  95. package/dist/docs/pages/actions/packs.md +148 -0
  96. package/dist/docs/pages/actions/settings.md +69 -0
  97. package/dist/docs/pages/actions/tools.md +244 -0
  98. package/dist/docs/pages/actions/triggers.md +149 -0
  99. package/dist/docs/pages/actions.md +88 -0
  100. package/dist/docs/pages/compat/anthropic.md +168 -0
  101. package/dist/docs/pages/compat/e2b.md +194 -0
  102. package/dist/docs/pages/compat/firecrawl.md +138 -0
  103. package/dist/docs/pages/compat/openai.md +168 -0
  104. package/dist/docs/pages/concepts/auth.md +151 -0
  105. package/dist/docs/pages/concepts/beta.md +55 -0
  106. package/dist/docs/pages/concepts/glossary.md +71 -0
  107. package/dist/docs/pages/concepts/ids.md +98 -0
  108. package/dist/docs/pages/concepts/jobs.md +229 -0
  109. package/dist/docs/pages/concepts/latency.md +138 -0
  110. package/dist/docs/pages/concepts/limits.md +191 -0
  111. package/dist/docs/pages/concepts/stack.md +59 -0
  112. package/dist/docs/pages/concepts/timing.md +86 -0
  113. package/dist/docs/pages/concepts/usage.md +110 -0
  114. package/dist/docs/pages/design/b3os-yaml.md +370 -0
  115. package/dist/docs/pages/design/deploy-from-github.md +122 -0
  116. package/dist/docs/pages/design/observability.md +134 -0
  117. package/dist/docs/pages/errors.md +1824 -0
  118. package/dist/docs/pages/infer/chat.md +570 -0
  119. package/dist/docs/pages/infer/limits.md +55 -0
  120. package/dist/docs/pages/infer/messages.md +185 -0
  121. package/dist/docs/pages/infer/responses.md +173 -0
  122. package/dist/docs/pages/infer/settings.md +154 -0
  123. package/dist/docs/pages/infer/speech.md +323 -0
  124. package/dist/docs/pages/infer.md +154 -0
  125. package/dist/docs/pages/introduction.md +162 -0
  126. package/dist/docs/pages/platform/addresses.md +174 -0
  127. package/dist/docs/pages/platform/call-log.md +99 -0
  128. package/dist/docs/pages/platform/custom-domains.md +104 -0
  129. package/dist/docs/pages/platform/keys.md +79 -0
  130. package/dist/docs/pages/platform/limits.md +57 -0
  131. package/dist/docs/pages/platform/members.md +101 -0
  132. package/dist/docs/pages/platform/requests.md +116 -0
  133. package/dist/docs/pages/platform/settings.md +129 -0
  134. package/dist/docs/pages/platform/webhooks.md +68 -0
  135. package/dist/docs/pages/platform.md +67 -0
  136. package/dist/docs/pages/quickstart/mcp.md +94 -0
  137. package/dist/docs/pages/quickstart/sandbox-agent.md +205 -0
  138. package/dist/docs/pages/quickstart/scrape.md +134 -0
  139. package/dist/docs/pages/quickstart.md +45 -0
  140. package/dist/docs/pages/render/inspections.md +162 -0
  141. package/dist/docs/pages/render/limits.md +72 -0
  142. package/dist/docs/pages/render/screenshots.md +179 -0
  143. package/dist/docs/pages/render/settings.md +431 -0
  144. package/dist/docs/pages/render/styles.md +342 -0
  145. package/dist/docs/pages/render/videos.md +272 -0
  146. package/dist/docs/pages/render.md +118 -0
  147. package/dist/docs/pages/routines/callables.md +174 -0
  148. package/dist/docs/pages/routines/definitions.md +361 -0
  149. package/dist/docs/pages/routines/limits.md +117 -0
  150. package/dist/docs/pages/routines/runs.md +328 -0
  151. package/dist/docs/pages/routines/settings.md +104 -0
  152. package/dist/docs/pages/routines/triggers.md +339 -0
  153. package/dist/docs/pages/routines.md +216 -0
  154. package/dist/docs/pages/sandboxes/agents.md +217 -0
  155. package/dist/docs/pages/sandboxes/commands.md +272 -0
  156. package/dist/docs/pages/sandboxes/images.md +166 -0
  157. package/dist/docs/pages/sandboxes/limits.md +143 -0
  158. package/dist/docs/pages/sandboxes/ports.md +260 -0
  159. package/dist/docs/pages/sandboxes/settings.md +358 -0
  160. package/dist/docs/pages/sandboxes/snapshots.md +423 -0
  161. package/dist/docs/pages/sandboxes/swarms.md +146 -0
  162. package/dist/docs/pages/sandboxes/volumes.md +131 -0
  163. package/dist/docs/pages/sandboxes.md +231 -0
  164. package/dist/docs/pages/sdks/cli.md +121 -0
  165. package/dist/docs/pages/sdks/mcp.md +169 -0
  166. package/dist/docs/pages/sdks/python.md +146 -0
  167. package/dist/docs/pages/sdks/typescript.md +202 -0
  168. package/dist/docs/pages/sdks.md +282 -0
  169. package/dist/docs/pages/settings.md +33 -0
  170. package/dist/docs/pages/vault/limits.md +46 -0
  171. package/dist/docs/pages/vault.md +133 -0
  172. package/dist/docs/pages/vision/agent-browser.md +115 -0
  173. package/dist/docs/pages/vision/crawl.md +333 -0
  174. package/dist/docs/pages/vision/extract.md +152 -0
  175. package/dist/docs/pages/vision/fetcher.md +15 -0
  176. package/dist/docs/pages/vision/limits.md +79 -0
  177. package/dist/docs/pages/vision/profiles.md +111 -0
  178. package/dist/docs/pages/vision/proxy.md +131 -0
  179. package/dist/docs/pages/vision/scrape.md +356 -0
  180. package/dist/docs/pages/vision/sessions.md +311 -0
  181. package/dist/docs/pages/vision/settings.md +656 -0
  182. package/dist/docs/pages/vision.md +175 -0
  183. package/dist/errors.d.ts +129 -0
  184. package/dist/errors.js +326 -0
  185. package/dist/errors.js.map +1 -0
  186. package/dist/main.d.ts +1 -1
  187. package/dist/main.js +26 -13
  188. package/dist/main.js.map +1 -1
  189. package/dist/manifest/domains.d.ts +50 -0
  190. package/dist/manifest/domains.js +159 -0
  191. package/dist/manifest/domains.js.map +1 -0
  192. package/dist/manifest/link.d.ts +20 -0
  193. package/dist/manifest/link.js +24 -0
  194. package/dist/manifest/link.js.map +1 -0
  195. package/dist/manifest/record.d.ts +1 -1
  196. package/dist/tool/archive.d.ts +33 -0
  197. package/dist/tool/archive.js +174 -0
  198. package/dist/tool/archive.js.map +1 -0
  199. package/dist/tool/calls.d.ts +46 -0
  200. package/dist/tool/calls.js +274 -0
  201. package/dist/tool/calls.js.map +1 -0
  202. package/dist/tool/checks.d.ts +21 -0
  203. package/dist/tool/checks.js +145 -0
  204. package/dist/tool/checks.js.map +1 -0
  205. package/dist/tool/elf.d.ts +19 -0
  206. package/dist/tool/elf.js +107 -0
  207. package/dist/tool/elf.js.map +1 -0
  208. package/dist/tool/predict.d.ts +8 -0
  209. package/dist/tool/predict.js +38 -0
  210. package/dist/tool/predict.js.map +1 -0
  211. package/dist/tool/ustar.d.ts +5 -0
  212. package/dist/tool/ustar.js +220 -0
  213. package/dist/tool/ustar.js.map +1 -0
  214. package/package.json +6 -5
@@ -0,0 +1,72 @@
1
+ # Render limits and FAQ
2
+
3
+ > Concurrency and size limits for screenshots and videos in the beta, retention of artifacts, and answers to common questions about render.
4
+
5
+ Source: https://docs.beta.b3os.org/render/limits.md
6
+
7
+ ## Limits
8
+
9
+ | Limit | Default |
10
+ |---|---|
11
+ | Screenshots at once (`render.screenshots.concurrent`) | 2 per organization |
12
+ | Videos at once (`render.videos.concurrent`), from create until they finish, queued ones and restyles included | 2 per organization |
13
+ | Inspections at once (`render.inspections.concurrent`) | 2 per organization |
14
+ | Inspection window | Up to 300 frames, at 10, 15, 30 or 60 frames per second, with up to 20 steps and 8 watched elements |
15
+ | Inspection request body | 256 KiB |
16
+ | Screenshot request body | 5 MiB, of which `html` up to 4 MiB |
17
+ | Screenshot viewport | 320 to 3840 wide, 240 to 2160 high, at `dpr` 1, 2 or 3 |
18
+ | Screenshot variants | 4 per capture |
19
+ | Video beats | 100, each with up to 50 steps and 2,000 characters of narration |
20
+ | Video output | Up to 3840 by 2160 at 24, 25, 30, 50 or 60 frames per second |
21
+ | Video request body | 1 MiB |
22
+ | Video goal | 500 characters; planning takes 90 seconds at most (`render.goal.plan_s`), 2 vision pages and 2 model answers |
23
+ | Aliases (`render.aliases.max`) | 50 per organization |
24
+ | Files of videos aliases keep (`render.kept.bytes`) | 2 GiB per organization |
25
+ | Share pages and their files (`render.share.address.rpm`) | 600 requests a minute per address |
26
+ | One share, from every address (`render.share.rpm`) | 6,000 requests a minute |
27
+ | oEmbed (`render.oembed.address.rpm`) | 60 requests a minute per address |
28
+
29
+ The share rates are counted per Cloudflare location, so they are approximate; over one, `usercontent.b3os.org` answers 429 with `Retry-After`. A request over a limit fails with [`limit_exceeded`](https://docs.beta.b3os.org/errors#limit_exceeded) or [`payload_too_large`](https://docs.beta.b3os.org/errors#payload_too_large); too many screenshots, videos or inspections at once returns [`429 concurrency_limited`](https://docs.beta.b3os.org/errors#concurrency_limited), whose detail names the limit you reached. Each is counted apart: videos that are still rendering never count against the screenshot or inspection limit.
30
+
31
+ Screenshots and videos used to share one count, `render.concurrent`. That ID is deprecated and kept for 14 days ([changelog](https://docs.beta.b3os.org/changelog)): until 2026-11-16 the 429's `limit.id` is `render.concurrent`, with unit `renders` and the value and count of the limit you reached, and `GET /v1/limits` lists it beside the two rows above. From 2026-11-16 `limit.id` is `render.screenshots.concurrent` or `render.videos.concurrent`, and `render.concurrent` leaves `GET /v1/limits` no earlier than that date.
32
+
33
+ ## Retention
34
+
35
+ Screenshots, videos, their artifacts and the raw captures behind restyles are kept for 7 days. An inspection's contact sheet is kept for 24 hours, and the inspection itself is not stored. An artifact URL works until its `url_expires_at`; `GET /v1/render/artifacts/{artifact_id}` returns a fresh URL, valid for 24 hours. After 7 days the artifact is gone and its ID answers [`410 artifact_expired`](https://docs.beta.b3os.org/errors#artifact_expired).
36
+
37
+ A video an [alias](https://docs.beta.b3os.org/render/videos#keep-a-demo-current-with-an-alias) points at is kept for as long as it does, with its files and raw capture (`expires_at: null`); once the alias moves on or is deleted, it is kept 24 hours more, or to its own expiry when that is later. A video's share ends with the video; an alias's share lasts as long as the alias.
38
+
39
+ ## Fixed in the beta
40
+
41
+ No request field changes these in the beta.
42
+
43
+ - [**Video encoding**](https://docs.beta.b3os.org/render/settings#video-encoding): H.264, BT.709. MP4 files are H.264 from x264 at the `veryfast` preset and CRF 20, with BT.709 color. No field changes the codec or quality.
44
+ - [**Video capture scale**](https://docs.beta.b3os.org/render/settings#video-capture-scale): Picked per segment. Parts of a video where the camera zooms in are captured at device scale 2, so zoomed text stays sharp, and the rest at 1. Screenshots take `dpr`; videos have no such field.
45
+ - [**Video background**](https://docs.beta.b3os.org/render/settings#video-background): Picked from 24 library images. A video's `auto` background, the default, is one of the library images `GET /v1/render/backgrounds?tag=video` lists, picked from the video's first frame for the page's tone and accent color, at least 12 L* from the page at the window's edges. The timeline's `style` names it. `studio` names the soft mesh videos drew before; `background_ref` names any library background. The set is the node's; no field changes it.
46
+ - [**Render egress**](https://docs.beta.b3os.org/render/settings#render-egress): Through the node's egress guard. Every capture browser's only way out is the node's egress proxy, under the same egress guard as vision, from the node's own address. You cannot bring a proxy.
47
+ - [**Signed-in captures**](https://docs.beta.b3os.org/render/settings#signed-in-captures): Through a vision profile. A screenshot with `profile`, or a video with `source.profile`, loads that vision profile's cookies and storage before the page loads: into a video's probe and every capture segment. It needs `vision:profiles:use`. A page that is still signed out fails and bills nothing.
48
+ - [**Signed URL lifetime and retention**](https://docs.beta.b3os.org/render/settings#signed-url-lifetime-and-retention): 24 hours and 7 days. A signed artifact URL works for 24 hours, and never past its file. Screenshots, videos and their files are kept 7 days. Fetch the resource again for a fresh URL.
49
+
50
+ ## FAQ
51
+
52
+ **Why is part of my page missing from the screenshot?**
53
+
54
+ Render captures once the page has loaded and its network has gone quiet for a short window. Content that animates in after that can be caught mid-animation. Wait longer with `wait_for_ms`, or use `wait_until: "networkidle"`.
55
+ **Can I embed artifact URLs in my app or docs?**
56
+
57
+ Yes. The URLs need no credentials, are served with `Content-Security-Policy: sandbox` from `usercontent.b3os.org`, and never set cookies. Each URL expires; store the artifact ID and ask for a fresh URL when you need one.
58
+ **Can I capture pages behind a login?**
59
+
60
+ Yes. Save a vision [profile](https://docs.beta.b3os.org/vision/profiles) and name it in `profile` on a screenshot or `source.profile` on a video: render loads its cookies and storage before the page loads, in every browser a video records with. A page that is still signed out (a sign-in form, a 401 or 403, or a move to a sign-in page) fails with [`profile_expired`](https://docs.beta.b3os.org/errors#profile_expired) and bills nothing; sign in again and save the profile. The image or video shows the signed-in page, so treat it and its link as private. See [capture a signed-in page](https://docs.beta.b3os.org/render/screenshots#capture-a-signed-in-page).
61
+ **Do failed renders cost anything?**
62
+
63
+ No. A screenshot or video that produces no artifact records no `render.screenshot` and no `render.video_s`, and a canceled video bills nothing. During the beta every unit is free anyway, within your limits; see [pricing](https://docs.beta.b3os.org/concepts/usage#pricing).
64
+ **Will the same script give the same video?**
65
+
66
+ Set `seed` and `start_time`. The recorder runs the page on a virtual clock with seeded randomness and a fixed start date, so a re-render produces the same frames. Without `start_time` the clock starts when the job was created, and `result.start_time` gives that value to send next time. Sites that change between runs still change, unless `recording.reuse` replays the earlier video's recording, which is kept for a day at most.
67
+ **Can I change the look of a video without recording again?**
68
+
69
+ Yes, [restyle](https://docs.beta.b3os.org/render/videos#restyle-a-video) it within 7 days: new background, frame, captions, size or formats. Restyling reuses the recorded capture and narration, so no browser runs. Camera moves stay as recorded.
70
+ **Where does the narration come from?**
71
+
72
+ The node's own speech model, through [`/v1/infer/audio/speech`](https://docs.beta.b3os.org/infer/speech) with word timestamps. A video bills only its seconds of output, `render.video_s`, narration included.
@@ -0,0 +1,179 @@
1
+ # Screenshots
2
+
3
+ > Capture a page, the full page or one element from a warm browser and compose it with a background and window frame, as JSON with signed URLs or as image bytes.
4
+
5
+ Source: https://docs.beta.b3os.org/render/screenshots.md
6
+
7
+ `POST /v1/render/screenshots` loads a URL (or renders HTML you send) in a warm browser, captures it, composes it with a style and encodes it, in one call.
8
+
9
+ ## Take a styled screenshot
10
+
11
+ **curl**
12
+
13
+ ```bash
14
+ curl -s https://beta-api.b3os.org/v1/render/screenshots \
15
+ -H "Authorization: Bearer $B3OS_API_KEY" \
16
+ -H "Content-Type: application/json" \
17
+ -d '{"url": "https://beta.b3os.org/demo/", "viewport": {"width": 1600, "height": 900},
18
+ "style": {"background": "midnight", "frame": "browser-dark"}, "format": "webp"}'
19
+ ```
20
+ **TypeScript**
21
+
22
+ ```ts
23
+ import { B3OS } from "@b3os/sdk";
24
+
25
+ const b3os = new B3OS();
26
+ const shot = await b3os.render.createScreenshot({
27
+ url: "https://beta.b3os.org/demo/",
28
+ viewport: { width: 1600, height: 900 },
29
+ style: { background: "midnight", frame: "browser-dark" },
30
+ format: "webp",
31
+ });
32
+ console.log(shot.artifacts[0].url);
33
+ ```
34
+ **Python**
35
+
36
+ ```python
37
+ from b3os import B3OS
38
+
39
+ b3os = B3OS()
40
+ shot = b3os.render.create_screenshot({
41
+ "url": "https://beta.b3os.org/demo/",
42
+ "viewport": {"width": 1600, "height": 900},
43
+ "style": {"background": "midnight", "frame": "browser-dark"},
44
+ "format": "webp",
45
+ })
46
+ print(shot["artifacts"][0]["url"])
47
+ ```
48
+ **MCP**
49
+
50
+ ```text
51
+ Take a screenshot of https://beta.b3os.org/demo/ at 1600x900 in a dark browser frame and give me the link.
52
+ ```
53
+
54
+ The agent calls `render_screenshot` with the URL, size and frame, and gets back the signed URL of the image (the local MCP server also returns the image itself).
55
+
56
+ The JSON response lists the `artifacts`, primary image first, each with a signed `url`, its size and `expires_at`, plus `timing` with the phases of the call, such as `navigate`, `capture`, `compose` and `encode`. Preset names such as `midnight` and `browser-dark` come from `GET /v1/render/presets`, which also returns a preview of each.
57
+
58
+ <img src="https://beta.b3os.org/assets/presets/styled.webp" alt="The demo app's Launch plan board inside a dark browser window frame with rounded corners and a shadow, on a dark blue gradient background." />
59
+
60
+ ## Get the image bytes instead
61
+
62
+ Send `Accept: image/webp`, `image/png` or `image/jpeg` and the response body is the image:
63
+
64
+ ```bash
65
+ curl -s https://beta-api.b3os.org/v1/render/screenshots \
66
+ -H "Authorization: Bearer $B3OS_API_KEY" \
67
+ -H "Content-Type: application/json" \
68
+ -H "Accept: image/png" \
69
+ -d '{"url": "https://beta.b3os.org/demo/", "format": "png"}' -o board.png
70
+ ```
71
+
72
+ ## Capture one element
73
+
74
+ `target` captures a single element, found the same way as in browser actions:
75
+
76
+ ```json
77
+ { "url": "https://beta.b3os.org/demo/pricing/", "target": { "selector": "#plans" }, "dpr": 2, "format": "png" }
78
+ ```
79
+
80
+ An element that never appears, or stays outside the viewport after scrolling to it, fails with [`target_not_found`](https://docs.beta.b3os.org/errors#target_not_found). `full_page: true` captures the whole scrollable page instead of the viewport.
81
+
82
+ ## Capture a signed-in page
83
+
84
+ Save a browser's cookies and storage as a vision [profile](https://docs.beta.b3os.org/vision/profiles), then name it in `profile`:
85
+
86
+ ```json
87
+ { "url": "https://beta.b3os.org/demo/", "profile": "demo-signed-in", "format": "png" }
88
+ ```
89
+
90
+ Render loads the profile's cookies and storage into the page's own browser before the page loads, so the image shows what a signed-in visitor sees. Loading a profile needs `vision:profiles:use`, which default keys have. The answer's `source.profile` is the profile's `prof_` ID. Render writes the cookies and storage into no answer, stored record or log line, but the image shows whatever the signed-in page shows, such as a name or an email address. Treat a signed-in image and its link as private: anyone with the link can open it. A profile of another project answers [`404 profile_not_found`](https://docs.beta.b3os.org/errors#profile_not_found).
91
+
92
+ When the page is still signed out, the profile no longer signs in: the screenshot fails with [`422 profile_expired`](https://docs.beta.b3os.org/errors#profile_expired) and bills nothing. Signed out means a sign-in form (with a password, an email or a one-time code), a 401 or 403 answer, a move to a sign-in page such as `/login` or `/oauth2/authorize`, or a sign-in wall over the page. Sign in again in a [browser session](https://docs.beta.b3os.org/vision/sessions), save the profile, and retry.
93
+
94
+ ## Options
95
+
96
+ | Field | Default | Meaning |
97
+ |---|---|---|
98
+ | `url` or `html` | | The page to load, or HTML to render with no network access |
99
+ | `profile` | none | A vision [profile](https://docs.beta.b3os.org/vision/profiles), by ID or name, to load before the page loads, to capture it signed in. With `url` only. See [capture a signed-in page](#capture-a-signed-in-page) |
100
+ | `viewport` | | Width 320 to 3840 and height 240 to 2160, in CSS pixels |
101
+ | `dpr` | 1 | Device pixel ratio: 1, 2 or 3 |
102
+ | `wait_until` | `auto` | `auto` takes the load event, or a painted first screen when the load event is held up; `load`, `domcontentloaded` or `networkidle` wait for that event. See [when the page is ready](#when-the-page-is-ready) |
103
+ | `wait_for_ms` | 0 | Extra settle time after the page is ready, up to 10 seconds |
104
+ | `theme` | `auto` | Emulate a light or dark color scheme; `auto` leaves the page's default |
105
+ | `overlays` | `remove` | `remove` hides consent walls, sign-up and app pop-ups, dim layers and chat widgets before the capture; `keep` leaves them and lists them in `warnings`. See [consent walls, pop-ups and ads](#consent-walls-pop-ups-and-ads) |
106
+ | `settle` | `auto` | `auto` finishes entrance animations and, for a page whose main area comes back blank while it is still loading, captures again for a short, bounded time; `fast` captures as soon as the page is ready |
107
+ | `hide` | none | CSS selectors to hide before capture, for anything `overlays` does not find, such as a site's own sticky promotion |
108
+ | `block_ads` | `true` | Block ads and trackers, and collapse the ad slots they leave empty |
109
+ | `style` | none | `background`, `frame` and the other preset names, plus `overrides`; see [styles and captions](https://docs.beta.b3os.org/render/styles). Without `style` the capture is encoded as the page painted it |
110
+ | `auto_background` | none | How the default `auto` background picks its library image: `pin`, `repick` or `vision: false`. A styled screenshot draws the same image as the site's videos, picked once per site; see [the auto background](https://docs.beta.b3os.org/render/styles#the-auto-background) |
111
+ | `format`, `quality` | `webp`, 90 | `webp`, `png` or `jpeg`; quality applies to WebP and JPEG |
112
+ | `variants` | none | Up to 4 extra encodings of the same capture, each with `format`, an optional `width` and `quality` |
113
+
114
+ Each variant is its own artifact and bills one more `render.screenshot`; the page is captured once.
115
+
116
+ ## When the page is ready
117
+
118
+ By default render captures once the page has loaded and its network has been quiet for a short window, ignoring requests that hang.
119
+
120
+ Some pages paint in a second and then hold their load event for much longer: a tracker or a script that never answers keeps the browser from calling the page loaded. With `wait_until: "auto"` (the default), render does not wait for that. A short, fixed time after the navigation started, it takes the page once its first screen has painted, with its web fonts, the images in view and any large video in view loaded, and has stayed that way for a moment. Some time later it takes a painted page even with media in view still on their way. The [API reference](https://docs.beta.b3os.org/api/post-v1-render-screenshots) gives these times under `wait_until`. Either way the answer carries a `load_incomplete` warning, and `page_state` is `loading` with signal `images_pending` when images or videos in view had not arrived. `wait_until: "load"` waits for the load event itself, up to `timeout_ms`.
121
+
122
+ Then `settle: "auto"` does three things:
123
+
124
+ - It finishes the page's entrance animations (CSS animations and transitions, and Web Animations, that run once), so a hero that fades in is captured at its end state. Animations that loop are left alone.
125
+ - It waits, for a bounded time (the API reference gives it under `settle`), for the first screen to fill in: a large video in view (a hero video with no poster) to show its first frame, skeleton blocks (the gray placeholder rows a site draws while its feed loads) to give way to content, and a large image or video player in view to show something. A video this browser cannot play, or one that has not arrived by then, is named in a `video_not_shown` warning, an image that has not loaded in `image_not_shown`, and skeleton blocks still in view in `content_placeholder`, with `page_state` `loading` and signal `placeholders`.
126
+ - It checks the capture itself. When the main area below the header is almost all one color and the page still has something coming, render captures again every 100 ms, up to the bound the [API reference](https://docs.beta.b3os.org/api/post-v1-render-screenshots) gives for `settle`. Something coming is images loading, text held at the start of a fade-in, a script's fade in progress, a document or fonts not yet loaded, a 202 from the site, a main area with nothing drawn in it while the page holds text, or, on a page that shows almost nothing yet, any request still open or finite animation still running. Render cannot tell a beacon or a request that never answers from content on its way, so a sparse page that has finished waits while one is open, up to that bound. A page with none of these, and neither of the two shapes below, pays only that check; the time spent waiting is `recapture_ms` in `timing`.
127
+
128
+ A page with the lower part of its first screen empty, or with a loading indicator on its own above the page's footer (a store with only its first row drawn), gets the same wait while render counts it as still drawing. If it still counts when the wait ends, the answer has a `partial_page` warning and `page_state` `loading` with signal `partial_page`. The indicator is a small element, outside links, buttons and page chrome, that keeps turning, is a progress bar that shows no value, or is named as a spinner or a loader and holds no finished content such as a loaded image, a paragraph or an SVG picture in which nothing moves. A spinner drawn by a shape inside an `<svg>`, or inside a web component's shadow root, is not read, so a page whose only indicator is drawn that way gets no wait from this check; a web component counts only by what its own element draws, its name or its own turning. A `<progress>` element or a `role="progressbar"` element that shows a value does not count, even below its end, because one look at the page cannot tell a bar on its way from one that stopped there; an element inside one that is named as a bar, as in Bootstrap's markup, where the value is on the outer element, can still count by its name. The indicator is on its own when, outside its box, the rows from its top down to the footer are one color. Render goes by what is under way, because it cannot see what a page will do next. For the indicator, that is a 202 from the site, or scripts, `fetch` or XHR requests, styles, fonts or frames the page started recently and that are still in flight; a `sendBeacon` beacon, an image pixel or a prefetch does not count. For the empty lower part, those count, and so do images in view still loading, a document or fonts not yet loaded, a fade in progress or held at its start and, on a page that shows almost nothing yet, any request or finite animation. So a page that has finished can still pay the wait and read `partial_page`: a spinner left on a page that answered 202 or keeps fetching, or a short page with a request still open. A page with neither shape gets no wait and no warning from this check. A page that is still blank after that is returned anyway, with `page_state` `loading` and a `blank_main_area` warning. For pages that fill in later still, wait for something specific. The demo app's activity page fills in its list after it loads, so a capture at load shows only the placeholder:
129
+
130
+ ```json
131
+ { "url": "https://beta.b3os.org/demo/slow/", "wait_until": "networkidle", "wait_for_ms": 1500 }
132
+ ```
133
+
134
+ `settle: "fast"` skips all three and captures as soon as the page is ready. Element shots (`target`) and full-page shots finish animations but do not wait for a blank page.
135
+
136
+ ## Consent walls, pop-ups and ads
137
+
138
+ Real pages open with things nobody wants in a screenshot: a consent wall that dims the page, a discount sign-up, a chat launcher, a gray band where a blocked ad was. With `overlays: "remove"` (the default for a `url`), render hides them before the capture and again right before it, after the page is ready:
139
+
140
+ - consent walls and banners, from the consent managers it knows by their markup (OneTrust, Sourcepoint, TrustArc, Didomi, Cookiebot and others) and from their text in English, German, French, Spanish, Japanese, Korean and Arabic. A layer that fills the whole viewport counts as a consent wall only when it also looks like one: a dim or blurred ground, a dialog, a consent manager's markup or an accept or reject button. An app that fills the viewport with its own content stays, even when its words are about cookies or privacy, such as a privacy settings screen or a cookie recipe
141
+ - sign-up, discount and app pop-ups, and the dim layer behind a dialog
142
+ - chat launchers and messengers
143
+
144
+ Nothing is clicked: no consent is given and no cookie is set. A dialog's scroll lock is lifted. The page's own header, navigation and hero video stay. Inline `html` is never changed.
145
+
146
+ A paywall or a registration wall is not hidden. It is what the site shows a visitor who is not a subscriber or not signed in, so the screenshot keeps it, with its dim layer and the page's scroll lock, and `page_state` says so: `paywall`, or `login` with signal `login_wall`, each with a warning. An offer with a close button, such as a newsletter or discount pop-up, is still hidden. With `block_ads` (the default), the ad slots left empty by the blocked requests collapse, so the content closes up instead of leaving a blank band.
147
+
148
+ The answer says what was hidden and what the site answered:
149
+
150
+ ```json
151
+ {
152
+ "status_code": 200,
153
+ "final_url": "https://www.example.org/news",
154
+ "page_state": { "state": "ok" },
155
+ "warnings": [],
156
+ "overlays_removed": [
157
+ { "kind": "consent", "signal": "sourcepoint", "count": 1 },
158
+ { "kind": "ad_slot", "signal": "empty", "count": 4 }
159
+ ]
160
+ }
161
+ ```
162
+
163
+ | Field | Meaning |
164
+ |---|---|
165
+ | `status_code` | The HTTP status the site answered. A 404 page is still a screenshot of the site's error page |
166
+ | `final_url` | The URL after redirects |
167
+ | `page_state` | `ok`, `error` (an error status, or a 200 whose title says the page is missing), `loading` (the main area stayed blank, images or videos in view had not arrived when the page was taken before its load event, skeleton blocks were still in view, or, when the wait ended, the lower part of the first screen was empty or a loading indicator stood alone above the page's footer while the site had answered 202 or the page still had work under way), `login` (a sign-in form instead of the content, signal `password_form`, or a registration wall over it, signal `login_wall`), `paywall` (a subscription wall over the content; vision has no such state) or `cookie_wall` (a consent overlay left in view with `overlays: "keep"`), with the `signal` that decided it. The same field names as vision's scrape |
168
+ | `warnings` | Codes with a sentence each: `http_status`, `blank_main_area`, `still_animating`, `login_form`, `video_not_shown` (a video or video player in view had no frame to show), `image_not_shown` (a large image in view had not loaded), `content_placeholder` (skeleton blocks were still in view), `partial_page` (the lower part of the first screen was empty or a loading indicator stood alone above the page's footer, and the site had answered 202 or the page still had work under way: the page may not have finished drawing, or may have finished with a spinner left in view), `load_incomplete` (the page was taken before its load event), `overlays_kept`, `paywall` and `login_wall` (a wall covers the content and was left in place), `text_glyph_missing` (characters of the style's text or the frame's title that no font on the node has, left blank) |
169
+ | `overlays_removed` | What was hidden, by `kind` (`consent`, `dialog`, `backdrop`, `banner`, `chat`, `ad_slot`) and `signal`, with a `count` |
170
+
171
+ `overlays: "keep"` captures the page as it loaded and lists what is in view in an `overlays_kept` warning. Anything the rules miss can still be hidden by selector with `hide`. A page that is a bot challenge or a block page is not captured: it fails with [`capture_failed`](https://docs.beta.b3os.org/errors#capture_failed) and reason `bot_challenge`.
172
+
173
+ ## Keep, fetch and delete
174
+
175
+ Screenshots are synchronous, so a stored screenshot has always succeeded. They are kept for 7 days. `GET /v1/render/screenshots/{screenshot_id}` returns one with fresh artifact URLs, `GET /v1/render/screenshots` lists them, and `DELETE` removes one and its artifacts. Signed URLs already handed out are not revoked yet: they keep working until they expire, at most 24 hours after they were issued.
176
+
177
+ <a href="https://beta.b3os.org/gallery/docs-site/shot-renders/08962fc458707315.webp"><img src="https://beta.b3os.org/gallery/docs-site/shot-renders/08962fc458707315.webp" srcset="https://beta.b3os.org/gallery/docs-site/shot-renders/37ae15c412ba7456.webp 640w, https://beta.b3os.org/gallery/docs-site/shot-renders/2e5ce87366fa6df3.webp 1080w, https://beta.b3os.org/gallery/docs-site/shot-renders/08962fc458707315.webp 2910w" sizes="(max-width: 640px) calc(100vw - 60px), 760px" alt="Screenshots in the dashboard: image from the capture docs-site/shot-renders" width="2910" height="2038" loading="lazy" /></a>
178
+
179
+ <sub>Captured 2026-11-15 from commit `2aac696d` on a GitHub Actions runner (colo MSP), one call, label `mock` (the dashboard in mock mode). Case `docs-site/shot-renders`.</sub>