Skip to Content
Keko
API reference

AI accounts

GET
/v1/accounts

Authorization

bearer
headerAuthorizationBearer <token>

Response Body

OK

application/json
  1. response
accounts*array<>
capabilities*array<string>
Example Request
curl -X GET 'https://api.keko.run/v1/accounts'
Example Response
{  "accounts": [    {      "id": "string",      "kind": "claude-subscription",      "label": "string",      "order": 0,      "state": "ok",      "resetsAt": 0,      "lastError": "string",      "addedAt": 0,      "updatedAt": 0,      "baseUrl": "string",      "providerId": "string",      "authStyle": "x-api-key",      "api": "openai-completions",      "models": [        "string"      ],      "providerAccountId": "string"    }  ],  "capabilities": [    "string"  ]}
POST
/v1/accounts

Authorization

bearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
account*||||
state?string
Default"ok"
Value in"ok""invalid_token""plan_not_allowed""usage_limit""unavailable"
resetsAt?|
Defaultnull

Response Body

OK

application/json
  1. response
account*
Example Request
curl -X POST 'https://api.keko.run/v1/accounts' \  -H 'Content-Type: application/json' \  -d '{  "account": {    "kind": "claude-subscription",    "label": "string",    "token": "string"  }}'
Example Response
{  "account": {    "id": "string",    "kind": "claude-subscription",    "label": "string",    "order": 0,    "state": "ok",    "resetsAt": 0,    "lastError": "string",    "addedAt": 0,    "updatedAt": 0,    "baseUrl": "string",    "providerId": "string",    "authStyle": "x-api-key",    "api": "openai-completions",    "models": [      "string"    ],    "providerAccountId": "string"  }}
PUT
/v1/accounts/order

Authorization

bearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
ids*array<>
Itemsitems <= 200

Response Body

OK

application/json
  1. response
accounts*array<>
Example Request
curl -X PUT 'https://api.keko.run/v1/accounts/order' \  -H 'Content-Type: application/json' \  -d '{  "ids": [    "string"  ]}'
Example Response
{  "accounts": [    {      "id": "string",      "kind": "claude-subscription",      "label": "string",      "order": 0,      "state": "ok",      "resetsAt": 0,      "lastError": "string",      "addedAt": 0,      "updatedAt": 0,      "baseUrl": "string",      "providerId": "string",      "authStyle": "x-api-key",      "api": "openai-completions",      "models": [        "string"      ],      "providerAccountId": "string"    }  ]}
GET
/v1/accounts/for-engine

Authorization

bearer
headerAuthorizationBearer <token>

Response Body

OK

application/json
  1. response
accounts*array<>
Example Request
curl -X GET 'https://api.keko.run/v1/accounts/for-engine'
Example Response
{  "accounts": [    {}  ]}
PATCH
/v1/accounts/for-engine/{id}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

id*string

Request Body

application/json
  1. body
credential?
signedInAt?number
state?string
Value in"ok""invalid_token""plan_not_allowed""usage_limit""unavailable"
resetsAt?number|null
lastError?|null

Response Body

OK

application/json
  1. response
ok*boolean
Example Request
curl -X PATCH 'https://api.keko.run/v1/accounts/for-engine/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "ok": true}
PATCH
/v1/accounts/{id}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

id*string

Request Body

application/json
  1. body
label?string
models?array<>
Itemsitems <= 1000
token?string
Lengthlength <= 8192
credential?

Response Body

OK

application/json
  1. response
account*
Example Request
curl -X PATCH 'https://api.keko.run/v1/accounts/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "account": {    "id": "string",    "kind": "claude-subscription",    "label": "string",    "order": 0,    "state": "ok",    "resetsAt": 0,    "lastError": "string",    "addedAt": 0,    "updatedAt": 0,    "baseUrl": "string",    "providerId": "string",    "authStyle": "x-api-key",    "api": "openai-completions",    "models": [      "string"    ],    "providerAccountId": "string"  }}
DELETE
/v1/accounts/{id}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

OK

application/json
  1. response
ok*boolean
Example Request
curl -X DELETE 'https://api.keko.run/v1/accounts/string'
Example Response
{  "ok": true}
POST
/v1/accounts/{id}/restore

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

OK

application/json
  1. response
account*
Example Request
curl -X POST 'https://api.keko.run/v1/accounts/string/restore'
Example Response
{  "account": {    "id": "string",    "kind": "claude-subscription",    "label": "string",    "order": 0,    "state": "ok",    "resetsAt": 0,    "lastError": "string",    "addedAt": 0,    "updatedAt": 0,    "baseUrl": "string",    "providerId": "string",    "authStyle": "x-api-key",    "api": "openai-completions",    "models": [      "string"    ],    "providerAccountId": "string"  }}