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

# Quick Start

> Go from zero to a running Android phone in 5 minutes

## 1. Create an account

Sign up at [agentcell.live/login](https://agentcell.live/login). An API key is automatically created for you.

## 2. Get your API key

Go to [Settings](https://agentcell.live/settings) to view or create API keys. All API requests require the `X-API-Key` header.

## 3. Spawn a phone

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://agentcell.live/api/sessions \
    -H "Content-Type: application/json" \
    -H "X-API-Key: YOUR_API_KEY" \
    -d '{}'
  ```

  ```python Python theme={null}
  import requests

  API = "https://agentcell.live/api"
  KEY = "YOUR_API_KEY"
  H = {"X-API-Key": KEY, "Content-Type": "application/json"}

  session = requests.post(f"{API}/sessions", headers=H, json={}).json()
  print(f"Session {session['id']} — {session['status']}")
  ```

  ```javascript JavaScript theme={null}
  const API = "https://agentcell.live/api";
  const KEY = "YOUR_API_KEY";

  const res = await fetch(`${API}/sessions`, {
    method: "POST",
    headers: { "X-API-Key": KEY, "Content-Type": "application/json" },
    body: "{}",
  });
  const session = await res.json();
  console.log(`Session ${session.id} — ${session.status}`);
  ```
</CodeGroup>

## 4. Wait for boot

Poll the session status until it's `"ready"` (\~30 seconds):

<CodeGroup>
  ```bash cURL theme={null}
  curl https://agentcell.live/api/sessions/SESSION_ID \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import time

  while True:
      s = requests.get(f"{API}/sessions/{session['id']}", headers=H).json()
      if s["status"] == "ready":
          break
      if s["status"] == "failed":
          raise Exception(s.get("error_message", "boot failed"))
      time.sleep(2)
  ```
</CodeGroup>

## 5. Run a task

Send a natural language task. The AI agent drives the phone and returns results:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://agentcell.live/api/sessions/SESSION_ID/agent/task \
    -H "Content-Type: application/json" \
    -H "X-API-Key: YOUR_API_KEY" \
    -d '{"task": "Open Settings and turn on Wi-Fi"}'
  ```

  ```python Python theme={null}
  result = requests.post(
      f"{API}/sessions/{session['id']}/agent/task",
      headers=H,
      json={"task": "Open Settings and turn on Wi-Fi"},
  ).json()

  print(result["status"])   # "completed" or "failed"
  print(result["summary"])  # what the agent did
  ```

  ```javascript JavaScript theme={null}
  const result = await fetch(
    `${API}/sessions/${session.id}/agent/task`,
    {
      method: "POST",
      headers: { "X-API-Key": KEY, "Content-Type": "application/json" },
      body: JSON.stringify({ task: "Open Settings and turn on Wi-Fi" }),
    },
  ).then(r => r.json());

  console.log(result.status, result.summary);
  ```
</CodeGroup>

## 6. Clean up

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE https://agentcell.live/api/sessions/SESSION_ID \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  requests.delete(f"{API}/sessions/{session['id']}", headers=H)
  ```
</CodeGroup>

<Note>
  Trial sessions auto-expire after 20 minutes if you're not subscribed. The instance is cleaned up after 1 hour.
</Note>
