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

# Autonomous API Reference

> Detailed documentation for Stelis Autonomous API endpoints

The Autonomous API allows you to perform complex web automation tasks with simple, high-level commands.

## POST /browse

Automate a series of actions on a website based on a natural language prompt.

### Endpoint

```
POST https://api.stelis.app/v1/browse
```

### Headers

```
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

### Request Body

| Parameter  | Type    | Description                                         |
| ---------- | ------- | --------------------------------------------------- |
| `prompt`   | string  | Natural language description of the task to perform |
| `url`      | string  | Starting URL for the automation task                |
| `maxSteps` | integer | (Optional) Maximum number of steps to perform       |

### Example Request

```json theme={null}
{
  "prompt": "Search for wireless headphones on Amazon and add the cheapest option to the cart",
  "url": "https://www.amazon.com",
  "maxSteps": 10
}
```

### Example Response

```json theme={null}
{
  "status": "success",
  "result": {
    "finalUrl": "https://www.amazon.com/cart",
    "actions": [
      { "type": "navigate", "url": "https://www.amazon.com" },
      { "type": "input", "selector": "#twotabsearchtextbox", "value": "wireless headphones" },
      { "type": "click", "selector": "#nav-search-submit-button" },
      { "type": "click", "selector": "[data-cel-widget='search_result_1']" },
      { "type": "click", "selector": "#add-to-cart-button" }
    ],
    "screenshot": "base64_encoded_image"
  }
}
```

## POST /retrieve

Retrieve specific information from a web page without performing actions.

### Endpoint

```
POST https://api.stelis.app/v1/retrieve
```

### Headers

```
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

### Request Body

| Parameter  | Type   | Description                                                |
| ---------- | ------ | ---------------------------------------------------------- |
| `url`      | string | URL of the page to retrieve information from               |
| `query`    | string | Natural language query about the page content              |
| `selector` | string | (Optional) CSS selector to focus on specific page elements |

### Example Request

```json theme={null}
{
  "url": "https://example.com/product-page",
  "query": "What is the current price of the product?",
  "selector": "#product-price"
}
```

### Example Response

```json theme={null}
{
  "status": "success",
  "result": {
    "answer": "The current price of the product is $49.99",
    "confidence": 0.95,
    "sourceText": "$49.99"
  }
}
```

For more information on error handling and rate limiting, please refer to our [Error Handling](/error-handling) guide.
