> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notte.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI Computer Use

> Run OpenAI's native screenshot and input actions on a Notte browser.

<Tip>
  Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
</Tip>

[OpenAI Computer Use](https://developers.openai.com/api/docs/guides/tools-computer-use) returns browser actions from screenshots. These Python and TypeScript examples connect its native Responses API `computer` tool to a Notte browser through Playwright over CDP.

## Set up

Clone the [Notte repository](https://github.com/nottelabs/notte) and open [examples/openai-computer-use](https://github.com/nottelabs/notte/tree/main/examples/openai-computer-use). Its README contains the complete runnable projects.

Set `NOTTE_API_KEY` from [Notte](https://console.notte.cc/apikeys) and `OPENAI_API_KEY` from [OpenAI](https://platform.openai.com/api-keys). Real model requests incur OpenAI API charges.

<Tabs>
  <Tab title="Python">
    Use Python 3.11+ and uv. Run `uv sync --locked`, then `uv run python python/demo.py`.
  </Tab>

  <Tab title="TypeScript">
    Use Node.js 24+. Open `typescript`, run `npm ci`, then `npm start`.
  </Tab>
</Tabs>

## Run a visual browser task

The example uses `gpt-6.1-sol` to read a random code from a screenshot and submit it through a form. It verifies the actual page result and returns `output`, `session_id`, and the actions executed. Each run owns its Notte session and closes it on success or error.

The reusable adapter executes ordered action batches and returns a screenshot at the original viewport resolution. It supports mouse movement, clicks, scrolling, dragging, typing, key presses, waits, and screenshots within the browser.

Provide a permission callback when adapting the adapter to other pages. The demo approves actions only on its own test page; pending API safety checks stop execution for human review. Keep consequential actions under your user's control, and treat page content as untrusted. Runs have turn, action, and time limits.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.