docs: make Cloud SDK API V4-first - #208
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
All reported issues were addressed across 52 files
Not reviewed (too large): docs/cloud/llms-full.txt (~3,170 lines), docs/llms-full.txt (~3,170 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 34 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 46 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
2 issues found across 22 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/cloud/llms-full.txt">
<violation number="1">
P3: The Python browser-control example calls `.raise_for_status()` on the PATCH request but not on the POST request. If the POST fails, `.json()` will raise a confusing error instead of surfacing the HTTP status. For consistency and clearer failure diagnostics, consider adding `.raise_for_status()` before `.json()` on the POST, or dropping it from the PATCH.</violation>
<violation number="2">
P3: The TypeScript browser control snippet mixes `await` and `.then()` on the same promise chain, which is redundant and less idiomatic than using one consistent style. Consider using either `await` throughout or `.then()` chaining — for example, `const response = await fetch(...); const browser = await response.json();` for clarity.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
|
|
||
| ```bash | ||
| curl -X POST https://api.browser-use.com/api/v3/browsers \ | ||
| curl https://api.browser-use.com/api/v4/runs \ |
There was a problem hiding this comment.
| curl https://api.browser-use.com/api/v4/runs \ | |
| curl https://api.browser-use.com/api/v4/runs \ |
| --- | ||
| title: Models | ||
| description: "Choose the right model for your task." | ||
| description: "Choose a V4 model and understand its token pricing." |
There was a problem hiding this comment.
| description: "Choose a V4 model and understand its token pricing." | |
| description: "Choose a V4 model and understand its token pricing." |
| console.log(ready?.data.live_view_url); | ||
|
|
||
| // After the human finishes: | ||
| const nextRun = await client.runs.create({ | ||
| task: "Continue from the current page", | ||
| model: "grok-4.5", | ||
| sessionId: run.sessionId, | ||
| }); |
There was a problem hiding this comment.
| console.log(ready?.data.live_view_url); | |
| // After the human finishes: | |
| const nextRun = await client.runs.create({ | |
| task: "Continue from the current page", | |
| model: "grok-4.5", | |
| sessionId: run.sessionId, | |
| }); | |
| console.log(ready?.data.live_view_url); | |
| // After the human finishes: | |
| const nextRun = await client.runs.create({ | |
| task: "Continue from the current page", | |
| model: "grok-4.5", | |
| sessionId: run.sessionId, | |
| }); |
| limit: 100, | ||
| }); | ||
| const ready = events.events.find( | ||
| (event) => event.type === "browser.ready", |
There was a problem hiding this comment.
| (event) => event.type === "browser.ready", | |
| (event) => event.type === "browser.ready",```suggestion | |
| (event) => event.type === "browser.ready",```suggestion | |
| (event) => event.type === "browser.ready", |
| @@ -0,0 +1,29 @@ | |||
| <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="480" viewBox="0 0 1200 480" role="img" aria-labelledby="title desc"> | |||
There was a problem hiding this comment.
| <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="480" viewBox="0 0 1200 480" role="img" aria-labelledby="title desc"> | |
| <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="480" viewBox="0 0 1200 480" role="img" aria-labelledby="title desc"> |
| <title id="title">Sessions sharing a persistent workspace</title> | ||
| <desc id="desc">Two independent sessions read and write files in one workspace.</desc> | ||
| <defs> | ||
| <filter id="rough"> | ||
| <feTurbulence type="fractalNoise" baseFrequency=".01" numOctaves="2" seed="17" result="noise"/> | ||
| <feDisplacementMap in="SourceGraphic" in2="noise" scale="1.4"/> | ||
| </filter> | ||
| </defs> | ||
| <rect width="1200" height="480" fill="#FFFFFF"/> | ||
| <rect x="20" y="20" width="1160" height="440" fill="none" stroke="#E4E4E7" stroke-width="2"/> | ||
| <g fill="none" stroke-linecap="round" stroke-linejoin="round" filter="url(#rough)"> | ||
| <rect x="60" y="82" width="280" height="120" rx="26" fill="#FFF3E8" stroke="#FE750E" stroke-width="4"/> | ||
| <rect x="60" y="292" width="280" height="120" rx="26" fill="#FFFFFF" stroke="#71717A" stroke-width="4"/> | ||
| <path d="M355 142 C400 147 420 185 465 218" stroke="#71717A" stroke-width="4"/> | ||
| <path d="M443 201 L467 220 L438 221" stroke="#71717A" stroke-width="4"/> | ||
| <path d="M355 352 C400 347 420 309 465 276" stroke="#71717A" stroke-width="4"/> | ||
| <path d="M438 273 L467 274 L443 293" stroke="#71717A" stroke-width="4"/> | ||
| <path d="M480 88 L1135 88 L1135 420 L480 420 Z" fill="#FFF3E8" stroke="#FE750E" stroke-width="4"/> | ||
| <path d="M480 88 L615 88 L642 58 L800 58 L828 88" fill="#FFF3E8" stroke="#FE750E" stroke-width="4"/> | ||
| <rect x="610" y="188" width="395" height="145" rx="26" fill="#FFFFFF" stroke="#71717A" stroke-width="4"/> | ||
| </g> | ||
| <g font-family="Virgil, Comic Sans MS, cursive" text-anchor="middle"> | ||
| <text x="200" y="158" font-size="38" fill="#18181B">SESSION A</text> | ||
| <text x="200" y="368" font-size="38" fill="#18181B">SESSION B</text> | ||
| <text x="808" y="145" font-size="40" fill="#18181B">WORKSPACE</text> | ||
| <text x="808" y="279" font-size="48" fill="#18181B">FILES</text> | ||
| </g> | ||
| </svg> |
There was a problem hiding this comment.
| <title id="title">Sessions sharing a persistent workspace</title> | |
| <desc id="desc">Two independent sessions read and write files in one workspace.</desc> | |
| <defs> | |
| <filter id="rough"> | |
| <feTurbulence type="fractalNoise" baseFrequency=".01" numOctaves="2" seed="17" result="noise"/> | |
| <feDisplacementMap in="SourceGraphic" in2="noise" scale="1.4"/> | |
| </filter> | |
| </defs> | |
| <rect width="1200" height="480" fill="#FFFFFF"/> | |
| <rect x="20" y="20" width="1160" height="440" fill="none" stroke="#E4E4E7" stroke-width="2"/> | |
| <g fill="none" stroke-linecap="round" stroke-linejoin="round" filter="url(#rough)"> | |
| <rect x="60" y="82" width="280" height="120" rx="26" fill="#FFF3E8" stroke="#FE750E" stroke-width="4"/> | |
| <rect x="60" y="292" width="280" height="120" rx="26" fill="#FFFFFF" stroke="#71717A" stroke-width="4"/> | |
| <path d="M355 142 C400 147 420 185 465 218" stroke="#71717A" stroke-width="4"/> | |
| <path d="M443 201 L467 220 L438 221" stroke="#71717A" stroke-width="4"/> | |
| <path d="M355 352 C400 347 420 309 465 276" stroke="#71717A" stroke-width="4"/> | |
| <path d="M438 273 L467 274 L443 293" stroke="#71717A" stroke-width="4"/> | |
| <path d="M480 88 L1135 88 L1135 420 L480 420 Z" fill="#FFF3E8" stroke="#FE750E" stroke-width="4"/> | |
| <path d="M480 88 L615 88 L642 58 L800 58 L828 88" fill="#FFF3E8" stroke="#FE750E" stroke-width="4"/> | |
| <rect x="610" y="188" width="395" height="145" rx="26" fill="#FFFFFF" stroke="#71717A" stroke-width="4"/> | |
| </g> | |
| <g font-family="Virgil, Comic Sans MS, cursive" text-anchor="middle"> | |
| <text x="200" y="158" font-size="38" fill="#18181B">SESSION A</text> | |
| <text x="200" y="368" font-size="38" fill="#18181B">SESSION B</text> | |
| <text x="808" y="145" font-size="40" fill="#18181B">WORKSPACE</text> | |
| <text x="808" y="279" font-size="48" fill="#18181B">FILES</text> | |
| </g> | |
| </svg> | |
| <title id="title">Sessions sharing a persistent workspace</title> | |
| <desc id="desc">Two independent sessions read and write files in one workspace.</desc> | |
| <defs> | |
| <filter id="rough"> | |
| <feTurbulence type="fractalNoise" baseFrequency=".01" numOctaves="2" seed="17" result="noise"/> | |
| <feDisplacementMap in="SourceGraphic" in2="noise" scale="1.4"/> | |
| </filter> | |
| </defs> | |
| <rect width="1200" height="480" fill="#FFFFFF"/> | |
| <rect x="20" y="20" width="1160" height="440" fill="none" stroke="#E4E4E7" stroke-width="2"/> | |
| <g fill="none" stroke-linecap="round" stroke-linejoin="round" filter="url(#rough)"> | |
| <rect x="60" y="82" width="280" height="120" rx="26" fill="#FFF3E8" stroke="#FE750E" stroke-width="4"/> | |
| <rect x="60" y="292" width="280" height="120" rx="26" fill="#FFFFFF" stroke="#71717A" stroke-width="4"/> | |
| <path d="M355 142 C400 147 420 185 465 218" stroke="#71717A" stroke-width="4"/> | |
| <path d="M443 201 L467 220 L438 221" stroke="#71717A" stroke-width="4"/> | |
| <path d="M355 352 C400 347 420 309 465 276" stroke="#71717A" stroke-width="4"/> | |
| <path d="M438 273 L467 274 L443 293" stroke="#71717A" stroke-width="4"/> | |
| <path d="M480 88 L1135 88 L1135 420 L480 420 Z" fill="#FFF3E8" stroke="#FE750E" stroke-width="4"/> | |
| <path d="M480 88 L615 88 L642 58 L800 58 L828 88" fill="#FFF3E8" stroke="#FE750E" stroke-width="4"/> | |
| <rect x="610" y="188" width="395" height="145" rx="26" fill="#FFFFFF" stroke="#71717A" stroke-width="4"/> | |
| </g> | |
| <g font-family="Virgil, Comic Sans MS, cursive" text-anchor="middle"> | |
| <text x="200" y="158" font-size="38" fill="#18181B">SESSION A</text> | |
| <text x="200" y="368" font-size="38" fill="#18181B">SESSION B</text> | |
| <text x="808" y="145" font-size="40" fill="#18181B">WORKSPACE</text> | |
| <text x="808" y="279" font-size="48" fill="#18181B">FILES</text> | |
| </g> | |
| </svg> |
| Use the returned key for Browser Use Cloud API requests. | ||
|
|
||
| For example, create a browser session: | ||
| For example, create an API V4 run: |
| -H "X-Browser-Use-API-Key: bu_..." \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{}' | ||
| -d '{"task":"Find the top Hacker News story"}' |
There was a problem hiding this comment.
| ``` | ||
|
|
||
| See the [Create Browser Session API reference](/cloud/api-v3/browsers/create-browser-session). | ||
| See the [API V4 quick start](/cloud/agent/quickstart). |
| Use the returned key for Browser Use Cloud API requests. | ||
|
|
||
| For example, create a browser session: | ||
| For example, create an API V4 run: |
| ``` | ||
|
|
||
| See the [Create Browser Session API reference](/cloud/api-v3/browsers/create-browser-session). | ||
| See the [API V4 quick start](/cloud/agent/quickstart). |
Summary
POST /api/v4/browsers, connect throughcdpUrl, and stop withPATCH /api/v4/browsers/{id}plus{"action":"stop"}client.close(),browser.close(), and disconnecting CDP do not perform the API V4 stop operationmodel, and passproxyCountryCodewheneverbrowserSettingsis presentllms.txt/llms-full.txtfiles with V4 guidanceThis supersedes #207. The aggregate PR diff is docs-only: no SDK implementation, SDK tests, or snapshot files differ from
main.Validation
xmllint; all editable Excalidraw sources parse withjqnullproxy when the documented raw-dictionary form is usedThe production key was supplied only through a hidden interactive environment variable, was unset after testing, and was never written to the repository or test files. Custom-proxy credentials and a real 2FA account were not available for full end-to-end testing; those request shapes were statically verified.