Base URL: http://localhost:8000
Interactive docs: http://localhost:8000/docs
POST /tasks
Request body:
{
"command": "open Chrome and search for weather",
"device_id": "DEVICE_SERIAL",
"model": "qwen2.5-vl:7b"
}
device_id and model are optional. Defaults to first available device and configured model.
Response:
{
"task_id": "uuid",
"status": "completed",
"command": "open Chrome and search for weather",
"actions": [
{
"step": 0,
"action": {"action_type": "tap", "x": 540, "y": 1200},
"result": {"status": "success"}
}
],
"error": null
}
GET /tasks/{task_id}
Returns task details and execution history.
GET /devices
Response:
[
{
"device_id": "R5CRA1XXXXX",
"model": "Pixel 7",
"status": "online",
"connection_type": "usb"
}
]
POST /devices/connect
Request body:
{
"address": "192.168.1.100",
"port": 5555
}
POST /devices/{device_id}/disconnect
WS /stream/{device_id}
Receives JSON frames:
{
"type": "frame",
"data": "base64_encoded_png",
"device_id": "DEVICE_SERIAL"
}
Frames are sent approximately every 500ms.
GET /scenarios
POST /scenarios
Request body:
{
"name": "morning_routine",
"description": "Check weather and calendar",
"steps": [
{"action": "open", "target": "Weather", "wait": 2.0},
{"action": "tap", "target": "today"},
{"action": "open", "target": "Calendar"}
]
}
GET /scenarios/{name}
PUT /scenarios/{name}
DELETE /scenarios/{name}
POST /scenarios/{name}/run
POST /voice/command
Content-Type: multipart/form-data
Upload audio file. Returns transcribed text and task result.
Response:
{
"text": "open settings",
"task_id": "uuid",
"status": "completed"
}
GET /voice/status
Response:
{
"stt_available": true,
"tts_available": true,
"wake_word_active": false
}
GET /models
Response:
[
{"name": "qwen2.5-vl:7b", "size": "4.7GB", "active": true},
{"name": "llava:7b", "size": "4.5GB", "active": false}
]
POST /models/switch
Request body:
{
"model": "llava:7b"
}