# Daytona Documentation (/docs/quickstart)

Daytona is secure and elastic cloud infrastructure built for autonomous agents.

Daytona provides **composable computers for agents** — [sandboxes](/docs/sandboxes) — virtual machines with hardware isolation, a dedicated kernel, filesystem, network, and allocated vCPU, RAM, and disk.

Sandboxes are the core component of the Daytona platform, spinning up in under 90ms from code to execution and running any code in Python, TypeScript, and JavaScript. Built on OCI/Docker compatibility and massive parallelization, sandboxes deliver consistent, predictable environments for AI, autonomous agents, and reinforcement learning.

## Get started [#get-started]

1. Create an account → [app.daytona.com](https://app.daytona.com)
2. Get an API key → [app.daytona.com/dashboard/keys](https://app.daytona.com/dashboard/keys)
3. Save the API key → `DAYTONA_API_KEY` environment variable or in a `.env` file.

<Tabs syncKey="shell">
<TabItem label=".env">

```bash
DAYTONA_API_KEY=YOUR_API_KEY
```

</TabItem>
<TabItem label="Bash/Zsh" icon="seti:shell">

```bash
export DAYTONA_API_KEY=YOUR_API_KEY
```

</TabItem>
<TabItem label="Windows PowerShell" icon="seti:powershell">

```powershell
$env:DAYTONA_API_KEY="YOUR_API_KEY"
```

</TabItem>
</Tabs>

<Tabs syncKey="language">
<TabItem label="Python" icon="seti:python">

4. Install the Python SDK

    ```bash
    pip install daytona==2.0.0a11
    ```

5. Create a sandbox and run code

    ```python
    from daytona import Daytona

    daytona = Daytona()

    sandbox = daytona.v2.create()

    response = sandbox.run_code('print("Hello World")')
    print(response.logs.stdout)
    ```

</TabItem>
<TabItem label="TypeScript" icon="seti:typescript">

4. Install the TypeScript SDK

    ```bash
    npm install @daytona/sdk@2.0.0-alpha.11
    ```

5. Create a sandbox and run code

    ```typescript
    import { Daytona } from '@daytona/sdk'

    const daytona = new Daytona()

    const sandbox = await daytona.v2.create()

    const response = await sandbox.runCode('print("Hello World")')
    console.log(response.logs.stdout)
    ```

</TabItem>
<TabItem label="CLI" icon="seti:shell">

4. Install the CLI

      <Tabs syncKey="platform">
      <TabItem label="Mac">

      ```bash
      brew install daytonaio/cli/daytona-alpha
      ```

      </TabItem>
      <TabItem label="Linux">

      ```bash
      # Installs the newest 2.x release for this host after verifying its checksum
      curl -fsSL https://github.com/daytona/clients/releases/download/v2.0.0-alpha.11/install.sh | sh
      ```

      </TabItem>
      <TabItem label="Windows">

      ```powershell
      irm https://github.com/daytona/clients/releases/download/v2.0.0-alpha.11/install.ps1 | iex
      ```

      </TabItem>
      </Tabs>

5. Log in

    <Tabs syncKey="shell">
    <TabItem label="Bash/Zsh" icon="seti:shell">

    ```bash
    daytona login --token "$DAYTONA_API_KEY" --api-url https://api.daytona.com
    ```

    </TabItem>
    <TabItem label="Windows PowerShell" icon="seti:powershell">

    ```powershell
    daytona login --token "$env:DAYTONA_API_KEY" --api-url https://api.daytona.com
    ```

    </TabItem>
    </Tabs>

6. Create a sandbox and run code

    ```bash
    daytona sandbox create
    daytona sandbox exec {sandboxId} -- python -c 'print("Hello World")'
    ```

</TabItem>
<TabItem label="API" icon="seti:json">

4. Create a sandbox and run code

    ```bash
    # Create sandbox
    curl 'https://api.daytona.com/sandboxes' \
      --request POST \
      --header 'Content-Type: application/json' \
      --header "Authorization: Bearer $DAYTONA_API_KEY" \
      --data '{}'

    # Wait until running
    curl 'https://api.daytona.com/sandboxes/{sandboxId}?wait=running&timeout_ms=60000' \
      --header "Authorization: Bearer $DAYTONA_API_KEY"

    # Run code; {toolboxProxyUrl} is toolbox_proxy_url from the sandbox response
    curl '{toolboxProxyUrl}/{sandboxId}/processes?waitMs=30000&logs=text' \
      --request POST \
      --header 'Content-Type: application/json' \
      --header "Authorization: Bearer $DAYTONA_API_KEY" \
      --data '{"kind": "code", "language": "python", "code": "print(\"Hello World\")"}'
    ```

</TabItem>
</Tabs>

## Reference [#reference]

Daytona provides a comprehensive set of resources for developers and agents to get started and build on the platform. You can find the following resources in the documentation:

- **Daytona Sandboxes**: [Linux](/docs/sandboxes#linux-sandboxes), [Windows](/docs/sandboxes#windows-sandboxes), [GPU](/docs/sandboxes#gpu-sandboxes), [macOS](/docs/sandboxes#macos-sandboxes)
- **Daytona SDKs**: [TypeScript](/docs/typescript-sdk), [Python](/docs/python-sdk)
- **Daytona APIs**: [Platform](/docs/api/daytona) ([OpenAPI](/docs/openapi.json)), [Toolbox](/docs/api/toolbox) ([OpenAPI](/docs/toolbox-openapi.json))
- **Daytona CLI**: [Mac/Linux/Windows](/docs/cli)
- **Daytona LLMs**: [llms.txt](https://www.daytona.com/llms.txt), [llms-full.txt](https://www.daytona.com/llms-full.txt)
- **Daytona Markdown**: suffix pages with `.md` (e.g [sandboxes.md](/docs/sandboxes.md))
