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

# Instruct

> Drive the browser with a natural language instruction

## Description

Issues a natural language instruction to the browser. AI interprets the instruction and performs the necessary interactions, such as clicking, typing, navigating, and extracting content.

## Authentication

Open-source deployments do not require authentication by default. If your server config enables `X-API-Key`, include that header with the request.

## Path Parameters

<ParamField path="id" type="string" required>
  The browser ID returned from Create Session.
</ParamField>

## Request Body

<ParamField body="instruction" type="string" required>
  A natural language description of what the browser should do.
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the instruction was completed successfully.
</ResponseField>

<ResponseField name="data" type="object">
  Result of the instruction. Structure depends on the instruction and configured AI provider.
</ResponseField>

## Example

```bash theme={null}
curl -X POST http://localhost:8080/browsers/exc-b9534e98-c3ce-4d1b-9671-b563ac66adc3/instruct/ \
  -H "Content-Type: application/json" \
  -d '{ "instruction": "Find the main heading and summarize the page" }'
```
