---
name: keepbal
description: >
  Connect an agent to KeepBal, Digidai’s agent capability layer. Use when the
  user says "set up https://keepbal.com/SKILL.md", needs a dgk_live_ key,
  OpenAI-compatible /v1, priced /apis tools, or an auditable micro-USD wallet.
  KeepRouter is a sister product, not this API. MCP transport is planned, not
  live. There is no live Digidai MCP server.
---

# KeepBal

KeepBal is Digidai’s agent capability layer: one `dgk_live_` key for OpenAI-compatible models and priced tools, settled in a wallet you can audit. Digidai owns the account, API key, and wallet. KeepRouter is a sister product, not this API.

Canonical public host: https://keepbal.com
Company: Digidai
Key prefix: `dgk_live_`
Worker / engineering name: `digidai-capability-gateway`

Aliases on the same Worker (no whole-site redirect — `__Host-` cookies stay on the host you signed in on):

- https://www.keepbal.com
- https://keepbal.dev
- https://wirecap.keeprouter.com
- https://agent.keeprouter.com

Always send `Authorization: Bearer dgk_live_...`. Never rename or mint `monid_` keys for customers.

## Setup command

```
set up https://keepbal.com/SKILL.md
```

Then create an account at https://keepbal.com/sign-up, issue a key at https://keepbal.com/console/keys, and keep the secret. It is shown once.

## Before any metered call

Inspect the live contract. Do not invent MCP, A2A, x402, or card checkout.

```
GET https://keepbal.com/healthz
GET https://keepbal.com/llms.txt
GET https://keepbal.com/.well-known/agent-card.json
GET https://keepbal.com/.well-known/mcp.json
GET https://keepbal.com/openapi.yaml
GET https://keepbal.com/catalog.json
GET https://keepbal.com/llms-full.txt
GET https://keepbal.com/docs
```

`/healthz` reports `product=KeepBal`, `company=Digidai`, `public_base_url`, and `upstream_mode`. A temporary validation adapter (`aisa_validation` or `monid_validation` if `/healthz` reports it) is not the product and not a white-label. `direct` implements Tavily search/extract only. Other direct routes and unconfigured billable calls return 503 and are not billed.

`/.well-known/mcp.json` is a REST tool list. There is **no** live Digidai MCP server. Do not call `/mcp` and do not claim a live MCP proxy.

## HTTP contract

Always send `Authorization: Bearer dgk_live_...`.

1. Models (OpenAI-compatible). Point any OpenAI SDK at:

   ```
   base_url = "https://keepbal.com/v1"
   ```

   - Free discovery: `GET https://keepbal.com/v1/models`
   - Chat: `POST https://keepbal.com/v1/chat/completions`
   - `monid_validation` does not serve model inference (those routes return 503 and are not billed).

2. Tools (priced per successful 2xx call on the static catalog):

   - `POST https://keepbal.com/apis/v1/tavily/search`
   - `POST https://keepbal.com/apis/v1/tavily/extract`
   - Full list: https://keepbal.com/openapi.yaml and https://keepbal.com/llms.txt
   - In `monid_validation` those catalog paths return 503 and are not billed. Use discover / inspect / run instead.

3. Discover / inspect / run (Digidai-facing `/apis/v1` when `/healthz` reports `monid_validation`):

   - `POST https://keepbal.com/apis/v1/discover` — not billed
   - `POST https://keepbal.com/apis/v1/inspect` — not billed
   - `POST https://keepbal.com/apis/v1/run` — Digidai debit = upstream quoted USD (pass-through) only on completed provider-success. Provider 4xx/5xx, FAILED, BLOCKED, TIMED_OUT, and 202-in-flight are $0.
   - `GET https://keepbal.com/apis/v1/runs` and `GET https://keepbal.com/apis/v1/runs/:runId` — list/poll; a previously unpaid successful run settles once (`monid-run:<runId>` idempotency)
   - `POST https://keepbal.com/apis/v1/runs/:runId/stop` — not billed at request time
   - `GET https://keepbal.com/apis/v1/wallet/balance` — same Digidai wallet as `/v1/credits/balance`, not an upstream provider wallet

4. Wallet:

   - `GET https://keepbal.com/v1/credits/balance`
   - `GET https://keepbal.com/v1/usage`

Signup grants $1 promotional credit. Extra credit is an operator grant. There is no self-serve card or crypto payment. Password recovery is not available.

## Honest limits

- MCP transport is planned, not live. `/.well-known/mcp.json` is a REST tool list. There is no MCP transport. Do not call `/mcp`.
- Agent Card `status` is `discovery_stub`. A2A task transport is not implemented.
- `/apis/v2/*` x402 returns 501.
- Catalog rows are candidates, not an SLA. Check `/healthz` before a metered call.
- Errors use the OpenAI envelope. `request_id` matches `x-digidai-request-id`.
- `402` = insufficient credits. `503 provider_unavailable` is never billed.
- Digidai owns the account, the `dgk_live_` key, and the wallet. A temporary validation adapter may forward discover/inspect/run. That adapter is not a permanent white-label catalog.
