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

# API Documentation

> Documentation for Account Quota API and Capture Screenshot Route

## Account Quota API

This API allows you to retrieve account quota details for a given company's account.

### Endpoint

* **URL:** `/api/account/quota`
* **Method:** GET

### Request

* **Headers:**
  * `x-api-key` (string, required): The API key for authentication.

### Response

* **200 OK:**
  * Description: Quota details retrieved successfully.
  * Body:
    ```json theme={null}
    {
      "success": true,
      "result": {
        "total_quota": 1000,
        "quota_used": 500,
        "quota_remaining": 500,
        "plan_name": "basic"
      }
    }
    ```

* **400 Bad Request:**
  * Description: Invalid API key.
  * Body:
    ```json theme={null}
    {
      "success": false,
      "message": "Invalid API key"
    }
    ```

* **500 Internal Server Error:**
  * Description: Internal server error.
  * Body:
    ```json theme={null}
    {
      "success": false,
      "message": "Internal server error"
    }
    ```

***

## Capture Screenshot Route

This endpoint allows you to capture a screenshot.

### Endpoint

* **URL:** `/api/capture-screenshot`
* **Method:** POST

### Request

* **Headers:**
  * `x-api-key` (string, required): The API key for authentication.

* **Body:**
  * `Params` (object, required): Parameters for capturing the screenshot.

### Response

* **200 OK:**
  * Description: Screenshot captured successfully.
  * Body:
    ```json theme={null}
    {
      "pageResourceSizeinKB": 1000,
      "screenshotUrl": "https://example.com/screenshot.png",
      "statusCode": 200,
      "success": true,
      "taskDurationSec": 1.5
    }
    ```

* **400 Bad Request:**
  * Description: Invalid request.
  * Body:
    ```json theme={null}
    {
      "error": 400,
      "message": "Bad request"
    }
    ```

* **401 Unauthorized:**
  * Description: Unauthorized.
  * Body:
    ```json theme={null}
    {
      "error": 401,
      "message": "Unauthorized"
    }
    ```

* **403 Forbidden:**
  * Description: Forbidden.
  * Body:
    ```json theme={null}
    {
      "error": 403,
      "message": "Forbidden"
    }
    ```

* **500 Internal Server Error:**
  * Description: Internal server error.
  * Body:
    ```json theme={null}
    {
      "error": 500,
      "message": "Internal server error"
    }
    ```
