Skip to Content
Keko
API reference

Devices

GET
/v1/dock/keys

Response Body

OK

application/json
  1. response
keys*array<>
Example Request
curl -X GET 'https://engine.keko.run/v1/dock/keys'
Example Response
{  "keys": [    {      "id": "string",      "publicKey": "string",      "endorsedBy": {        "id": "string",        "signature": "string"      }    }  ]}

Your devices

GET
/v1/devices

Authorization

bearer
headerAuthorizationBearer <token>

Response Body

OK

application/json
  1. response
devices*array<>
Example Request
curl -X GET 'https://engine.keko.run/v1/devices'
Example Response
{  "devices": [    {      "id": "string",      "name": "string",      "online": true,      "kind": "cloud",      "hostname": "string",      "os": "string",      "arch": "string",      "info": {        "name": "string",        "hostname": "string",        "os": "string",        "arch": "string",        "folders": [          "string"        ],        "home": "string",        "version": "string",        "hardware": {          "type": "laptop",          "model": "string",          "chip": "string",          "cores": 1,          "memoryBytes": 1,          "system": "string"        },        "capabilities": {          "arch": "string",          "git": "string",          "gh": "string",          "node": "string",          "bun": "string",          "python": "string",          "docker": "string",          "browser": "string",          "desktop": "string",          "desktopPort": 1,          "computer": [            "string"          ],          "recording": "string",          "previews": true,          "diskFreeBytes": 0,          "memoryFreeBytes": 0,          "memoryLimitBytes": 0        },        "gitCredentials": "own",        "app": "mac",        "variables": true      },      "lastSeenAt": 0,      "createdAt": 0,      "maxThreads": 1,      "userId": "string"    }  ]}
POST
/v1/devices

Authorization

bearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
name*string
Default""
hostname?string
Lengthlength <= 255
os?string
Lengthlength <= 32
arch?string
Lengthlength <= 32

Response Body

OK

application/json
  1. response
device*
pairingToken*string
Example Request
curl -X POST 'https://engine.keko.run/v1/devices' \  -H 'Content-Type: application/json' \  -d '{  "name": ""}'
Example Response
{  "device": {    "id": "string",    "name": "string",    "online": true,    "kind": "cloud",    "hostname": "string",    "os": "string",    "arch": "string",    "info": {      "name": "string",      "hostname": "string",      "os": "string",      "arch": "string",      "folders": [        "string"      ],      "home": "string",      "version": "string",      "hardware": {        "type": "laptop",        "model": "string",        "chip": "string",        "cores": 1,        "memoryBytes": 1,        "system": "string"      },      "capabilities": {        "arch": "string",        "git": "string",        "gh": "string",        "node": "string",        "bun": "string",        "python": "string",        "docker": "string",        "browser": "string",        "desktop": "string",        "desktopPort": 1,        "computer": [          "string"        ],        "recording": "string",        "previews": true,        "diskFreeBytes": 0,        "memoryFreeBytes": 0,        "memoryLimitBytes": 0      },      "gitCredentials": "own",      "app": "mac",      "variables": true    },    "lastSeenAt": 0,    "createdAt": 0,    "maxThreads": 1  },  "pairingToken": "string"}
POST
/v1/devices/{deviceId}/pairing

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

deviceId*string

Response Body

OK

application/json
  1. response
device*
pairingToken*string
Example Request
curl -X POST 'https://engine.keko.run/v1/devices/string/pairing'
Example Response
{  "device": {    "id": "string",    "name": "string",    "online": true,    "kind": "cloud",    "hostname": "string",    "os": "string",    "arch": "string",    "info": {      "name": "string",      "hostname": "string",      "os": "string",      "arch": "string",      "folders": [        "string"      ],      "home": "string",      "version": "string",      "hardware": {        "type": "laptop",        "model": "string",        "chip": "string",        "cores": 1,        "memoryBytes": 1,        "system": "string"      },      "capabilities": {        "arch": "string",        "git": "string",        "gh": "string",        "node": "string",        "bun": "string",        "python": "string",        "docker": "string",        "browser": "string",        "desktop": "string",        "desktopPort": 1,        "computer": [          "string"        ],        "recording": "string",        "previews": true,        "diskFreeBytes": 0,        "memoryFreeBytes": 0,        "memoryLimitBytes": 0      },      "gitCredentials": "own",      "app": "mac",      "variables": true    },    "lastSeenAt": 0,    "createdAt": 0,    "maxThreads": 1  },  "pairingToken": "string"}
PATCH
/v1/devices/{deviceId}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

deviceId*string

Request Body

application/json
  1. body
name?string
Length1 <= length <= 80
maxThreads?|null

Response Body

OK

application/json
  1. response
device*
Example Request
curl -X PATCH 'https://engine.keko.run/v1/devices/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "device": {    "id": "string",    "name": "string",    "online": true,    "kind": "cloud",    "hostname": "string",    "os": "string",    "arch": "string",    "info": {      "name": "string",      "hostname": "string",      "os": "string",      "arch": "string",      "folders": [        "string"      ],      "home": "string",      "version": "string",      "hardware": {        "type": "laptop",        "model": "string",        "chip": "string",        "cores": 1,        "memoryBytes": 1,        "system": "string"      },      "capabilities": {        "arch": "string",        "git": "string",        "gh": "string",        "node": "string",        "bun": "string",        "python": "string",        "docker": "string",        "browser": "string",        "desktop": "string",        "desktopPort": 1,        "computer": [          "string"        ],        "recording": "string",        "previews": true,        "diskFreeBytes": 0,        "memoryFreeBytes": 0,        "memoryLimitBytes": 0      },      "gitCredentials": "own",      "app": "mac",      "variables": true    },    "lastSeenAt": 0,    "createdAt": 0,    "maxThreads": 1,    "userId": "string"  }}
DELETE
/v1/devices/{deviceId}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

deviceId*string

Response Body

OK

application/json
  1. response
ok*boolean
Example Request
curl -X DELETE 'https://engine.keko.run/v1/devices/string'
Example Response
{  "ok": true}
GET
/v1/cloud/status

Authorization

bearer
headerAuthorizationBearer <token>

Response Body

OK

application/json
  1. response
available*boolean
outage?
fallback*
suggestedDeviceId?string
waiting*array<>
Example Request
curl -X GET 'https://engine.keko.run/v1/cloud/status'
Example Response
{  "available": true,  "outage": {    "reason": "starts",    "message": "string",    "until": 0  },  "fallback": {    "mode": "ask",    "deviceId": "string"  },  "suggestedDeviceId": "string",  "waiting": [    {      "id": "string",      "title": "string",      "projectName": "string",      "createdAt": 0,      "model": {        "provider": "string",        "id": "string"      },      "permissionMode": "ask",      "ownerId": "string",      "message": "string",      "until": 0,      "firstMessage": "string",      "failed": "string",      "starting": true    }  ]}
PUT
/v1/cloud/fallback

Authorization

bearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
mode*string
Value in"ask""server""wait"
deviceId?string
Length1 <= length

Response Body

OK

application/json
  1. response
available*boolean
outage?
fallback*
suggestedDeviceId?string
waiting*array<>
Example Request
curl -X PUT 'https://engine.keko.run/v1/cloud/fallback' \  -H 'Content-Type: application/json' \  -d '{  "mode": "ask"}'
Example Response
{  "available": true,  "outage": {    "reason": "starts",    "message": "string",    "until": 0  },  "fallback": {    "mode": "ask",    "deviceId": "string"  },  "suggestedDeviceId": "string",  "waiting": [    {      "id": "string",      "title": "string",      "projectName": "string",      "createdAt": 0,      "model": {        "provider": "string",        "id": "string"      },      "permissionMode": "ask",      "ownerId": "string",      "message": "string",      "until": 0,      "firstMessage": "string",      "failed": "string",      "starting": true    }  ]}
GET
/v1/dock

Control messages as JSON text frames, channel bytes as binary frames (a u32 channel id, then the bytes). Closes with DOCK_CLOSE codes: 4003 refused, 4002 update required, 4000 violation, 1012 restarting. A token that matches no device gets a 401 with x-keko-dock: refused, on the upgrade and on a plain GET (which answers 426 for a good token); a removed device’s token also gets x-keko-dock-reason: Device removed.

Authorization

bearer
headerAuthorizationBearer <token>

Response Body

Switches to a WebSocket

Example Request
curl -X GET 'https://engine.keko.run/v1/dock'
Example Response
Empty