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

# Step API Reference

> Details on Stelis Step API endpoints

The Step API allows for more granular control over web automation tasks by managing sessions and executing individual steps.

## POST /session

Create a new browser session.

### Request

```json theme={null}
{
  "headless": true,
  "incognito": false
}
```

### Response

```json theme={null}
{
  "status": "success",
  "sessionId": "sess_123abc456def"
}
```

## POST /session/{sessionId}

Execute a step in an existing session.

### Request

```json theme={null}
{
  "action": "click",
  "selector": "#submit-button"
}
```

### Response

```json theme={null}
{
  "status": "success",
  "result": {
    "action": "click",
    "selector": "#submit-button",
    "success": true
  }
}
```

## DELETE /session/{sessionId}

Close an existing session.

### Response

```json theme={null}
{
  "status": "success",
  "message": "Session closed successfully"
}
```

## GET /session/{sessionId}/screenshot

Take a screenshot of the current page in the session.

### Response

```json theme={null}
{
  "status": "success",
  "screenshot": "base64_encoded_image"
}
```

## GET /sessions

List all active sessions.

### Response

```json theme={null}
{
  "status": "success",
  "sessions": [
    {
      "id": "sess_123abc456def",
      "created_at": "2023-07-18T10:30:00Z",
      "last_active": "2023-07-18T10:35:00Z"
    },
    {
      "id": "sess_789ghi101112",
      "created_at": "2023-07-18T11:00:00Z",
      "last_active": "2023-07-18T11:10:00Z"
    }
  ]
}
```

For more detailed information on request and response formats, error handling, and rate limiting, please refer to our [API Documentation](https://docs.stelis.app/api).
