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

# Basic

[GBOX](https://gbox.ai) provides cloud-based Android automation testing without the need to purchase, configure, or maintain any Android devices. GBOX supports both `virtual machines` and `physical devices`, letting you focus on testing:

* **No Device Management** - Eliminate hardware procurement, system configuration, and device maintenance hassles
* **Ready to Use** - Get clean Android testing environments in seconds
* **Flexible Options** - Choose between virtual machines or physical devices based on your testing needs
* **Auto Scaling** - Run multiple tests in parallel without hardware limitations

<Steps>
  <Step title="Get an API Key">
    1. Go to [GBOX AI](http://gbox.ai)
    2. Copy your API Key
    3. Paste your GBOX API Key into your `env` file

    ```bash .env theme={null}
    GBOX_API_KEY=gbox-******
    ```
  </Step>

  <Step title="Install GBOX SDK and other dependencies">
    Install gbox-sdk and other dependencies by running the following command in your terminal.

    <CodeGroup>
      ```bash Typescript icon="https://cdn.worldvectorlogo.com/logos/typescript.svg" theme={null}
      npm install gbox-sdk dotenv typescript tsx @types/node
      ```

      ```bash Python icon="https://cdn.worldvectorlogo.com/logos/python-5.svg" theme={null}
      # Set up a virtual environment
      python3 -m venv venv
      source venv/bin/activate

      pip install gbox-sdk python-dotenv
      ```
    </CodeGroup>
  </Step>

  <Step title="Create a basic Android box">
    Create a basic Android box by running the following code.

    <CodeGroup>
      ```typescript Typescript icon="https://cdn.worldvectorlogo.com/logos/typescript.svg" theme={null}
      import GboxSDK from "gbox-sdk";
      import * as dotenv from "dotenv";

      dotenv.config();

      const gboxSDK = new GboxSDK({
        apiKey: process.env["GBOX_API_KEY"], // This is the default and can be omitted
      });

      async function main() {
        const box = await gboxSDK.create({ type: "android" });

        console.log(`Android box created: ${box.data.id}`);

        // take a screenshot of the box
        await box.action.screenshot({
          path: "screenshot.png",
        });

        // terminate the box
        await box.terminate();

        console.log("Box terminated");
      }

      main();
      ```

      ```python Python icon="https://cdn.worldvectorlogo.com/logos/python-5.svg" theme={null}
      import os
      from dotenv import load_dotenv
      from gbox_sdk import GboxSDK

      # Load environment variables from .env file
      load_dotenv()

      def main():
          api_key = os.getenv("GBOX_API_KEY")

          gbox = GboxSDK(api_key=api_key)

          box = gbox.create(type="android")

          print(f"Android box created: {box.data.id}")

          # take a screenshot of the box
          box.action.screenshot(path="screenshot.png")

          # terminate the box
          box.terminate()

          print("Box terminated")

      if __name__ == "__main__":
          main()
      ```
    </CodeGroup>
  </Step>

  <Step title="Run the box">
    Run the box by running the following command in your terminal.

    <CodeGroup>
      ```bash Typescript icon="https://cdn.worldvectorlogo.com/logos/typescript.svg" theme={null}
      npx tsx index.ts
      ```

      ```bash Python icon="https://cdn.worldvectorlogo.com/logos/python-5.svg" theme={null}
      python main.py
      ```
    </CodeGroup>
  </Step>
</Steps>

<Card title="More Android Capabilities" icon="android" href="/api-reference/android/list-apps">
  Explore the complete Android API reference to discover all available
  operations and features.
</Card>
