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

# Quickstart

> This guide will show you how to create your first box.

<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">
    Install the GBOX SDK to your project 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
      ```

      ```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 dotenv
      ```
    </CodeGroup>
  </Step>

  <Step title="Use the GBOX SDK to create and control environments for your AI agents">
    Sample: Create a Linux box capable of running python code.

    <CodeGroup>
      ```bash 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();

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

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

        const result = await myBox.runCode({
          code: `print("Hello from Python!")`,
          language: "python"
        })

        console.log("Python execution result:");
        console.log(result)
      }

      main();
      ```

      ```bash 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")
          # Initialize GboxSDK
          gbox = GboxSDK(api_key=api_key)
          # Create a Linux box
          box = gbox.create(type="linux")
          print(f"Linux box created: {box.data.id}")
          # Run Python code in the box
          result = box.run_code(
              code='print("Hello from Python!")',
              language="python"
          )
          print("Python execution result:")
          print(result)

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

    See the [API Reference](/api-reference/box/create-linux-box) for details.
  </Step>

  <Step title="Run the code">
    <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>
