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

# Install app

[GBOX](https://gbox.ai) lets you easily install Android applications on cloud-based devices without needing physical hardware. You can install apps from APK files, URLs, or local files, making app testing and development seamless:

* **Flexible Installation** - Install apps from URLs, local APK files, or app stores
* **Instant Access** - Install and launch apps in seconds on clean Android environments
* **No Setup Required** - Skip device configuration and app sideloading complexities
* **Live Testing** - View and interact with installed apps through live browser sessions

<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 Android box and install app">
    Create a basic Android box by running the following code.

    <CodeGroup>
      ```typescript Typescript icon="https://cdn.worldvectorlogo.com/logos/typescript.svg" highlight={16-19} 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}`);

        // install markor (a open source markdown editor)
        const app = await box.app.install({
          apk: "https://github.com/gsantner/markor/releases/download/v2.14.1/net.gsantner.markor-v158-2.14.1-flavorDefault-release.apk"
        })

        // open the app
        await app.open()

        // you can also install an apk from your local machine
        // const app = await box.app.install({
        //   apk: "/path/to/your/app.apk"
        // })

        const liveView = await box.liveView()
        console.log(`Open the following URL in your browser to see the live view: ${liveView.url}`);
      }

      main();
      ```

      ```python Python icon="https://cdn.worldvectorlogo.com/logos/python-5.svg" highlight={19} 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}")

          # install markor (a open source markdown editor)
          app = box.app.install(
              apk="https://github.com/gsantner/markor/releases/download/v2.14.1/net.gsantner.markor-v158-2.14.1-flavorDefault-release.apk"
          )

          # open the app
          app.open()

          # you can also install an apk from your local machine
          # app = box.app.install({
          #     "apk": "/path/to/your/app.apk"
          # })

          live_view = box.live_view()
          print(f"Open the following URL in your browser to see the live view: {live_view.url}")

      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>
