Skip to content

docs: make Cloud SDK API V4-first - #208

Merged
gregpr07 merged 15 commits into
mainfrom
codex/api-v4-docs-ux
Jul 26, 2026
Merged

docs: make Cloud SDK API V4-first#208
gregpr07 merged 15 commits into
mainfrom
codex/api-v4-docs-ux

Conversation

@gregpr07

@gregpr07 gregpr07 commented Jul 26, 2026

Copy link
Copy Markdown
Member

Summary

  • make the main Cloud SDK experience API V4-first, with Python, TypeScript, and curl quickstarts
  • present the two Cloud products with native Mintlify components: Agent for goal-based work and Browser for direct CDP control, both on the same managed browser infrastructure
  • add a concise create/connect/stop Browser example directly to the main quickstart
  • shorten and reorganize the Agent docs around running tasks, sessions, workspaces, scripts, structured output, observability, and human takeover
  • enlarge the Agent concept diagrams and use a restrained hand-drawn treatment with paired light/dark Browser Use colors and clean Geist typography
  • document the standalone browser lifecycle: create with POST /api/v4/browsers, connect through cdpUrl, and stop with PATCH /api/v4/browsers/{id} plus {"action":"stop"}
  • explicitly warn that client.close(), browser.close(), and disconnecting CDP do not perform the API V4 stop operation
  • document current TypeScript generated-type requirements without changing the SDK: pass model, and pass proxyCountryCode whenever browserSettings is present
  • isolate V3-only material under the API V3 tab and regenerate the root and Cloud llms.txt / llms-full.txt files with V4 guidance
  • explain when to choose API V4 versus API V2, link the Odysseys benchmark, and recommend Grok 4.5 as the best price/accuracy balance

This supersedes #207. The aggregate PR diff is docs-only: no SDK implementation, SDK tests, or snapshot files differ from main.

Validation

  • Mintlify build validation passes
  • rendered docs were inspected in light and dark modes at desktop and mobile widths
  • the Cloud welcome page uses native Mintlify cards/callouts and contains no custom overview image
  • enlarged diagrams are responsive, legible, and do not introduce page overflow
  • all SVGs parse with xmllint; all editable Excalidraw sources parse with jq
  • representative TypeScript snippets typecheck against the unchanged current SDK
  • Python request construction preserves an explicit null proxy when the documented raw-dictionary form is used
  • generated root and Cloud LLM files match, and the production credential is absent from the repository
  • a live production browser lifecycle passed through raw curl, Python + Playwright, and TypeScript + Playwright: create, connect to Example Domain, and stop via the V4 API
  • broader production checks passed for Python, TypeScript, curl, sessions, events, structured JSON, workspaces, profile reuse, proxy disabled, German proxy, recording/live view, and save-script-then-reuse

The 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.

@mintlify

mintlify Bot commented Jul 26, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
browser-use 🟢 Ready View Preview Jul 26, 2026, 12:09 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jul 26, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
browser-use 🟡 Building Jul 26, 2026, 12:08 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docs/cloud/agent/structured-output.mdx
Comment thread docs/cloud/agent/structured-output.mdx
Comment thread docs/cloud/agent/workspaces.mdx
Comment thread docs/cloud/faq.mdx Outdated
Comment thread docs/cloud/guides/2fa.mdx Outdated
Comment thread docs/cloud/agent/models.mdx
Comment thread docs/cloud/agent/models.mdx
Comment thread docs/cloud/agent/observability.mdx Outdated
Comment thread docs/cloud/agent/structured-output.mdx
Comment thread docs/cloud/guides/profile-sync.mdx

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docs/cloud/images/v4-agent-overview-dark.excalidraw Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docs/cloud/agent/sessions.mdx

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@gregpr07
gregpr07 merged commit 70c438c into main Jul 26, 2026
7 checks passed

```bash
curl -X POST https://api.browser-use.com/api/v3/browsers \
curl https://api.browser-use.com/api/v4/runs \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: "Choose a V4 model and understand its token pricing."
description: "Choose a V4 model and understand its token pricing."

Comment on lines +49 to +56
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,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(event) => event.type === "browser.ready",
(event) => event.type === "browser.ready",```suggestion
(event) => event.type === "browser.ready",```suggestion
(event) => event.type === "browser.ready",

@abdullahra634-dotcom

Copy link
Copy Markdown

e5faff7

@@ -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">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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">

Comment on lines +2 to +29
<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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-H "X-Browser-Use-API-Key: bu_..." \
-H "Content-Type: application/json" \
-d '{}'
-d '{"task":"Find the top Hacker News story"}'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

```

See the [Create Browser Session API reference](/cloud/api-v3/browsers/create-browser-session).
See the [API V4 quick start](/cloud/agent/quickstart).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abdullahra634-dotcom abdullahra634-dotcom left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the returned key for Browser Use Cloud API requests.

For example, create a browser session:
For example, create an API V4 run:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

```

See the [Create Browser Session API reference](/cloud/api-v3/browsers/create-browser-session).
See the [API V4 quick start](/cloud/agent/quickstart).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants