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

# API Reference

> REST API for spawning and controlling Android phones

## Base URL

```
https://agentcell.live/api
```

## Authentication

All endpoints require an API key passed via the `X-API-Key` header:

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

Get your API key from [Settings](https://agentcell.live/settings).

## Endpoints

<CardGroup cols={2}>
  <Card title="Create Session" icon="plus" href="/api-reference/endpoint/create-session">
    Spawn a new Android phone instance
  </Card>

  <Card title="List Sessions" icon="list" href="/api-reference/endpoint/list-sessions">
    List all your sessions
  </Card>

  <Card title="Get Session" icon="mobile" href="/api-reference/endpoint/get-session">
    Get status and details of a session
  </Card>

  <Card title="Delete Session" icon="trash" href="/api-reference/endpoint/delete-session">
    Stop and remove an instance
  </Card>

  <Card title="Run Task" icon="robot" href="/api-reference/endpoint/run-task">
    Run a natural language task on a session
  </Card>
</CardGroup>

## Status codes

| Code | Meaning                                |
| ---- | -------------------------------------- |
| 200  | Success                                |
| 402  | Trial expired or session limit reached |
| 404  | Session not found                      |
| 409  | Session not ready (still booting)      |
| 422  | Invalid request body                   |
