Skip to Content
Keko
API reference

Threads

DELETE
/v1/cloud/waiting/{threadId}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

threadId*string

Response Body

OK

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

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

threadId*string

Request Body

application/json
  1. body
deviceId*string
Length1 <= length

Response Body

OK

application/json
  1. response
thread*
Example Request
curl -X POST 'https://engine.keko.run/v1/cloud/waiting/string/start' \  -H 'Content-Type: application/json' \  -d '{  "deviceId": "string"}'
Example Response
{  "thread": {    "id": "string",    "title": "string",    "projectPath": "string",    "worktreePath": "string",    "branch": "string",    "baseBranch": "string",    "device": "string",    "model": {      "provider": "string",      "id": "string"    },    "createdAt": 0,    "state": "setting-up",    "cost": 0,    "setup": {      "status": "running",      "problems": [        "string"      ]    },    "deviceName": "string",    "deviceOnline": true,    "machineId": "string",    "machineState": "creating",    "projectId": "string",    "needsYou": true,    "question": "string",    "statusLine": "string",    "waitingForDevice": {      "deviceId": "string",      "since": 0    },    "waitingForCloud": {      "message": "string",      "until": 0,      "firstMessage": "string",      "failed": "string",      "starting": true    },    "request": {      "callId": "string",      "title": "string",      "command": true,      "ask": {        "options": [          "string"        ]      }    },    "majorId": "string",    "userId": "string",    "unread": true  }}
GET
/v1/threads

Authorization

bearer
headerAuthorizationBearer <token>

Response Body

OK

application/json
  1. response
threads*array<>
Example Request
curl -X GET 'https://engine.keko.run/v1/threads'
Example Response
{  "threads": [    {      "id": "string",      "title": "string",      "projectPath": "string",      "worktreePath": "string",      "branch": "string",      "baseBranch": "string",      "device": "string",      "model": {        "provider": "string",        "id": "string"      },      "createdAt": 0,      "state": "setting-up",      "cost": 0,      "setup": {        "status": "running",        "problems": [          "string"        ]      },      "deviceName": "string",      "deviceOnline": true,      "machineId": "string",      "machineState": "creating",      "projectId": "string",      "needsYou": true,      "question": "string",      "statusLine": "string",      "waitingForDevice": {        "deviceId": "string",        "since": 0      },      "waitingForCloud": {        "message": "string",        "until": 0,        "firstMessage": "string",        "failed": "string",        "starting": true      },      "request": {        "callId": "string",        "title": "string",        "command": true,        "ask": {          "options": [            "string"          ]        }      },      "majorId": "string",      "userId": "string",      "unread": true    }  ]}
POST
/v1/threads

Authorization

bearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
deviceId*string
Default""
path?string
project?
insteadOfCloud?boolean
firstMessage*string
Default""
model*
Default
{  "provider": "",  "id": ""}
title?string
permissionMode?string
Value in"ask""auto"
baseBranch?string
requestId?string
allowSecret?boolean

Response Body

OK

application/json
  1. response
thread*
Example Request
curl -X POST 'https://engine.keko.run/v1/threads' \  -H 'Content-Type: application/json' \  -d '{  "deviceId": "",  "firstMessage": "",  "model": {    "provider": "",    "id": ""  }}'
Example Response
{  "thread": {    "id": "string",    "title": "string",    "projectPath": "string",    "worktreePath": "string",    "branch": "string",    "baseBranch": "string",    "device": "string",    "model": {      "provider": "string",      "id": "string"    },    "createdAt": 0,    "state": "setting-up",    "cost": 0,    "setup": {      "status": "running",      "problems": [        "string"      ]    },    "deviceName": "string",    "deviceOnline": true,    "machineId": "string",    "machineState": "creating",    "projectId": "string",    "needsYou": true,    "question": "string",    "statusLine": "string",    "waitingForDevice": {      "deviceId": "string",      "since": 0    },    "waitingForCloud": {      "message": "string",      "until": 0,      "firstMessage": "string",      "failed": "string",      "starting": true    },    "request": {      "callId": "string",      "title": "string",      "command": true,      "ask": {        "options": [          "string"        ]      }    },    "majorId": "string",    "userId": "string",    "unread": true  }}

One thread

GET
/v1/threads/{threadId}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

threadId*string

Response Body

OK

application/json
  1. response
thread*
Example Request
curl -X GET 'https://engine.keko.run/v1/threads/string'
Example Response
{  "thread": {    "id": "string",    "title": "string",    "projectPath": "string",    "worktreePath": "string",    "branch": "string",    "baseBranch": "string",    "device": "string",    "model": {      "provider": "string",      "id": "string"    },    "createdAt": 0,    "state": "setting-up",    "cost": 0,    "setup": {      "status": "running",      "problems": [        "string"      ]    },    "deviceName": "string",    "deviceOnline": true,    "machineId": "string",    "machineState": "creating",    "projectId": "string",    "needsYou": true,    "question": "string",    "statusLine": "string",    "waitingForDevice": {      "deviceId": "string",      "since": 0    },    "waitingForCloud": {      "message": "string",      "until": 0,      "firstMessage": "string",      "failed": "string",      "starting": true    },    "request": {      "callId": "string",      "title": "string",      "command": true,      "ask": {        "options": [          "string"        ]      }    },    "majorId": "string",    "userId": "string",    "unread": true  }}
PATCH
/v1/threads/{threadId}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

threadId*string

Request Body

application/json
  1. body
title?string
archived?boolean
pinned?boolean
permissionMode?string
Value in"ask""auto"
model?

Response Body

OK

application/json
  1. response
thread*
Example Request
curl -X PATCH 'https://engine.keko.run/v1/threads/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "thread": {    "id": "string",    "title": "string",    "projectPath": "string",    "worktreePath": "string",    "branch": "string",    "baseBranch": "string",    "device": "string",    "model": {      "provider": "string",      "id": "string"    },    "createdAt": 0,    "state": "setting-up",    "cost": 0,    "setup": {      "status": "running",      "problems": [        "string"      ]    },    "deviceName": "string",    "deviceOnline": true,    "machineId": "string",    "machineState": "creating",    "projectId": "string",    "needsYou": true,    "question": "string",    "statusLine": "string",    "waitingForDevice": {      "deviceId": "string",      "since": 0    },    "waitingForCloud": {      "message": "string",      "until": 0,      "firstMessage": "string",      "failed": "string",      "starting": true    },    "request": {      "callId": "string",      "title": "string",      "command": true,      "ask": {        "options": [          "string"        ]      }    },    "majorId": "string",    "userId": "string",    "unread": true  }}
POST
/v1/threads/{threadId}/messages

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

threadId*string

Request Body

application/json
  1. body
text*string
Default""
mode?|null
requestId?string
allowSecret?boolean

Response Body

OK

application/json
  1. response
submissionId*string
Example Request
curl -X POST 'https://engine.keko.run/v1/threads/string/messages' \  -H 'Content-Type: application/json' \  -d '{  "text": ""}'
Example Response
{  "submissionId": "string"}
POST
/v1/threads/{threadId}/stop

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

threadId*string

Response Body

OK

application/json
  1. response
ok*boolean
Example Request
curl -X POST 'https://engine.keko.run/v1/threads/string/stop'
Example Response
{  "ok": true}
POST
/v1/threads/{threadId}/read

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

threadId*string

Response Body

OK

application/json
  1. response
ok*boolean
Example Request
curl -X POST 'https://engine.keko.run/v1/threads/string/read'
Example Response
{  "ok": true}
GET
/v1/threads/{threadId}/entries

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

threadId*string

Query Parameters

minEntryId?string
Match^\d+$
maxEntryId?string
Match^\d+$
order?string
Value in"ascending""descending"
limit?string
Match^\d+$

Response Body

OK

application/json
  1. response
items*array<unknown>
next?unknown
Example Request
curl -X GET 'https://engine.keko.run/v1/threads/string/entries'
Example Response
{  "items": [    null  ],  "next": null}
GET
/v1/threads/{threadId}/preview

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

threadId*string

Query Parameters

port*string
Match^\d+$

Response Body

OK

application/json
  1. response
url*string
Example Request
curl -X GET 'https://engine.keko.run/v1/threads/string/preview?port=string'
Example Response
{  "url": "string"}
GET
/v1/threads/{threadId}/watch

Sends pi-durable's conversation view, then each commit's Chord operations. from, min and max pick the window (ConversationTranscript.resume).

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

threadId*string

Query Parameters

from?string
min?string
max?string

Response Body

Switches to a WebSocket

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